The Daily Click ::. Forums ::. Klik Coding Help ::. Invader Movement?
 

Post Reply  Post Oekaki 
 

Posted By Message

-Martin-



Registered
  20/03/2004
Points
  19
1st August, 2004 at 10:43:56 -

How to make a good movement for the Invaders in a Space Invader Game?

 
n/a

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
1st August, 2004 at 12:36:12 -

Set a non-alien active object (after this called the control object) flags on if the aliens are going left, and off if they are going right. Have every 00.02 or so, set alien's position depending on the flag example Set Alien X position to X(Alien)+2, and reverse for going left. Then when the alien is far enough left of right, set the flag to the appropiate value. (do not use aliens as control object, as this will only set the flag of the alien turning)

Now this will only let the aliens move left and right. Now to make them move down, we can use a value. Add "value a of (control object) = 0" to the events for the aliens movement. Create a new event, every 00.04 "value A of (control object) > 0" and add actions for moving the alien down, Set Alien Y position to Y(Alien)+2, and substract 1 from (control object) value A. Finally, add an action to set this value to 45.

Now try it, and mess a little with the additions/substractions for Alien's position, timing and stuff. Get it to your liking.

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

-Martin-



Registered
  20/03/2004
Points
  19
1st August, 2004 at 16:16:14 -

Thank you =D

 
n/a
   

Post Reply



 



Advertisement

Worth A Click