enemy movement
Posted:
Tue Jul 08, 2008 9:42 pm
by agreenlife3
i'm trying to figure out how to get a group of enemies to move in a straight line towards the main character. but i can't get it to work. I put the enemy's parent as the filled region box called movement but i can't remember what you have to put into the script editor to get the group to move. (something with xvelocity i think). While I'm at how do you make barriers that the player can't pass through.
thanks
Re: enemy movement
Posted:
Sat Jan 17, 2009 10:12 pm
by BloodRedDragon
you dont exactly need the filled region box, you just need script editor actions for your enemy.
Select events then create actor, draw actor or Key down then use Script Editor.type:
yvelocity = -10;(for moving up)
yvelocity= +10;(for moving down)
xvelocity= -10; (for moving left)
xvelocity= +10; (for moving right)
If you want them to gradually increase in speed then use yvelocity = yvelocity +(value between 0 and 1)
If you want it to move towards the character you could also use Move To and select the right actors.