Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: seraphimdreamer777 on Thu 17/04/2008 04:46:17

Title: How do I make enemies attack the player character
Post by: seraphimdreamer777 on Thu 17/04/2008 04:46:17
How am I supposed to get a enemy character to attack the player character I've looked it up in both the help files and FAQ pages and on top of that I can't get enemies to move on their own free will either they only move if I interact with them such as look,speak,touch,use item,etc. So basically what I'm asking is how I give enemies A.I.
Title: Re: How do I make enemies attack the player character
Post by: Mehrdad on Thu 17/04/2008 06:06:05
not easy .but possible.you better choose another software.like MULTIMEDIA FUSION or GAME MAKER.
Title: Re: How do I make enemies attack the player character
Post by: EnterTheStory (aka tolworthy) on Thu 17/04/2008 08:01:08
Quote from: seraphimdreamer777 on Thu 17/04/2008 04:46:17So basically what I'm asking is how I give enemies A.I.
My game has a lot of characters who have very simple AI. You just need to use 'repeatedly_execute_always()'. In my game I typically have 30 characters on screen, and they decide to walk or talk on their own.

The only problem I had was speed, since it can slow the game down f you change so many things every frame. But I solved that by checking just one character every frame, and using "WalkStraight" instead of "Walk" whenever possible.
Title: Re: How do I make enemies attack the player character
Post by: Khris on Thu 17/04/2008 09:32:07
Yep, rep_ex, Character.x/.y and a functioning brain is pretty much all you need.
Title: Re: How do I make enemies attack the player character
Post by: seraphimdreamer777 on Sat 19/04/2008 04:21:03
Thanks but I tried what you told me but its not working and mainly I wanted to get the enemies to follow the player character without me having to click on them first sorry if I wasn't as specific
Title: Re: How do I make enemies attack the player character
Post by: Mazoliin on Sat 19/04/2008 13:59:44
There's the FollowCharacter command, I believe it's what you're looking for. Read the manual to get more information about it.