Enemies chasing my character

Game Editor comments and discussion.

Enemies chasing my character

Postby Luke playa » Tue Feb 20, 2007 8:45 pm

How do i make an enemy follow my character? I guess the MoveTo variable has something to do with it, but how do i use it?
Luke playa
 
Posts: 11
Joined: Tue Feb 20, 2007 4:50 pm
Location: USA
Score: 0 Give a positive score

Postby Game A Gogo » Wed Feb 21, 2007 12:25 am

could do this in draw actor:
Code: Select all
angle=direction(x, y, Player.x, Player.y);//Get the direction the Player is from the enemy
directional_velocity=2;//Speed of the enemy, you may change this
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Postby Luke playa » Wed Feb 21, 2007 12:21 pm

thanks a bunch :o
Luke playa
 
Posts: 11
Joined: Tue Feb 20, 2007 4:50 pm
Location: USA
Score: 0 Give a positive score

Postby Game A Gogo » Wed Feb 21, 2007 10:47 pm

np! ++ points >..>
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron