I'd like to build a permanant movement from up to bot and bot to up for my sprite object
I have a sprite object and i'd like this :
If this Object <= to Y.position(0px):
Object move 1 pixel at angle 90 (going to bottom)
If this Object <= to Y.position(100px)
Object move 1 pixel at angle 270 (going to top)
Can you help me please ?
Develop games in your browser. Powerful, performant & highly capable.
Lol, i found sorry.
Global Variable TriggerMyObject = 0
Every ticks call the function MyObjectFunction()
SubEvent If TriggerMyObject = 0 : MyObject move 1 pixel at 90
Sub-SubEvent MyObject Yposition > 100 : TriggerMyObject = 1
SubEvent If TriggerMyObject = 1 : MyObject move 1 pixel at 270
Sub-SubEvent MyObject Yposition < 0 : TriggerMyObject = 0[/code:3ezgd8yu]