how do i make enemies chase me?

Game Editor comments and discussion.

Postby speckford123 » Wed Jun 21, 2006 1:32 pm

CrimsonX wrote:I used that code and i have 2 question. How to get enemies to attack the main character. 2. How to make multiple attacks kill actors.


try " using if statements like when he moves put things
like " angle = direction(x, y, yourhero .x, yourhero .y);
if (collision free x, y,)
directional_velocity = 10;
to move him when not being hit and on collision change animation attacking

also you could add " if(animindex==0) //or the number of your running animation to move him only when in that animation. also if's may lag the computer so use them wisely.
P.S. you can use if statements for multiple animations i.e.
if (animindex>2)
if (animindex<5)
//do this
speckford123
 
Posts: 334
Joined: Fri May 05, 2006 6:33 pm
Score: 49 Give a positive score

Previous

Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron