This site requires JavaScript, please enable it in your browser!
Greenfoot back
lastaccountbanned
lastaccountbanned wrote ...

2018/4/10

(Danpost, help), gradual side to side movement.

lastaccountbanned lastaccountbanned

2018/4/10

#
Something like if(condition1){ move(3); }else{ move(-3); } The object should go right a little bit then left a little bit. Almost like it's bouncing of invisible borders. I'm planning to do this with many objects of a certain class so I don't want them to overlap. ------ I want them to go side to side like the enemies in this galaga game ( free galaga . com ) , just like in the game there will be many of them.
danpost danpost

2018/4/10

#
If you want them to move something like how aliens move in space invaders, see my Space Invaders Movement Demo scenario.
lastaccountbanned lastaccountbanned

2018/4/10

#
Is there a way to make it smoother?
danpost danpost

2018/4/10

#
lastaccountbanned wrote...
Is there a way to make it smoother?
You could probably just remove the delay timer (in the Space class) and decrease the distance moved per act step (in the Invader class).
You need to login to post a reply.