I'm trying to make this rabbit as an enemy.. I mean, I want to make this sprite horizontally move but when it turns right, how can i make the position mirrored while having sine as behavior? Or should I use another way?
Giving enemy Platform behaviour is the norm. You simulate left and right and mirror/not mirror as intended.
Alright, I'll do that. Can I give the maximum extent to how far that sprite can run?
there are a number of ways to limit its movement...
the easiest might be to put an invisible sprite at the edges of where you want, and if the rabbit hits the sprite, have it reverse its direction.
ah nice tips! I got it, thanks! : )
there are a number of ways to limit its movement... the easiest might be to put an invisible sprite at the edges of where you want, and if the rabbit hits the sprite, have it reverse its direction.
Wait.. how to make it invisible without clicking on it?
Develop games in your browser. Powerful, performant & highly capable.
The object has properties bar and near the bottom there is 'initially visible' which is usually ticked, you can untick this to make it invisible by default.
ok the rabbit now cannot move, just jumping on its place.anything wrong with my code?
Dunno, cannot see the code :D should be a simulate left/right and if it collides with the invisible sprite then simulate the opposite direction
Ok I'm done with the wall, and now how to make it mirrored if I don't touch the rabbit?
You can use set mirrored/not mirrored actions together with the simulate actions in the same event.
Thanks my friend! : )