enemy movement

Game Editor comments and discussion.

enemy movement

Postby agreenlife3 » Tue Jul 08, 2008 9:42 pm

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
agreenlife3
 
Posts: 1
Joined: Tue Jul 08, 2008 7:15 pm
Score: 0 Give a positive score

Re: enemy movement

Postby BloodRedDragon » Sat Jan 17, 2009 10:12 pm

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.
Current projects:
Techno-Tank Arena: on hold
Techno-Tank SuperPortal (working title): 0.1%
Bowels of Galaxies: 35% (was a bit too optimistic)
User avatar
BloodRedDragon
 
Posts: 123
Joined: Tue Jan 29, 2008 10:07 pm
Location: The Underworld
Score: 5 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron