This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-11-11 19:51:21

SuperGuys
Scratcher
Registered: 2012-02-25
Posts: 11

X and Y Independent Enemy Movement

I am making an X,Y scrolling game, but I need to know if there is a way to make enemies move independently from the main character! Here is a link to the project, http://scratch.mit.edu/projects/SuperGuys/2866148 I know there is a way to do it if each individual enemy has its own variable, but that is a lot of variables! Does anyone know a more simple way?


http://i49.tinypic.com/i3t6ht.gif  The Demo! Click the link to try it!

Offline

 

#2 2012-11-11 21:09:20

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: X and Y Independent Enemy Movement

Is this what you need?
http://wiki.scratch.mit.edu/wiki/Making_Objects_Move_in_Scrollers


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#3 2012-11-12 14:06:21

SuperGuys
Scratcher
Registered: 2012-02-25
Posts: 11

Re: X and Y Independent Enemy Movement

Yes, but you need variables for each enemy. I tried this once, but a more simple way would be nice  smile   Thanks anyways!


http://i49.tinypic.com/i3t6ht.gif  The Demo! Click the link to try it!

Offline

 

#4 2012-11-12 15:08:16

Llamalover
Scratcher
Registered: 2007-05-18
Posts: 100+

Re: X and Y Independent Enemy Movement

I haven't looked at the project, but maybe instead of variables you could use a list? Each variable could be replaced by an item of the list. That way you only have one list instead of however many variables.


Be nice, I'm an old lady  wink

Offline

 

Board footer