move a sprite left and right on its own
-
just need help with moving a sprite left and right on its own
dir=> ? using maps and sprites
i can do one direction but cant update it to change direction unless controlled -
How about;
X=50
setSpriteSpeed(sprite, X, 0)if sprite.x > somePosition then X*=-1
That will flip the direction....
-
@SwitchedOn il try i think i did something similar but no dice
-
@pianofire has an awesome demonstration of this with a map project and named areas. Looking at it, I can see you've posted on that - remember that changing the sprite.x property will actually change where it is on screen, whereas changing sprite.x_speed (sprite.x_speed *= -1) will change its direction
-
@Dave good point didn't think of that, copy and past time ;)