Stopping an actor falling with a stop button
Esayem
Member Posts: 8
Hi there
I'm looking for a way to stop an actor through the use of a button. I basically have one actor falling in a vertical line, but I want to stop it's movement with a 'stop' button. Any ideas as to how I could approach this? I'm very new to game salad and have mostly been experimenting with some basic functions.
Thanks in advance!
I'm looking for a way to stop an actor through the use of a button. I basically have one actor falling in a vertical line, but I want to stop it's movement with a 'stop' button. Any ideas as to how I could approach this? I'm very new to game salad and have mostly been experimenting with some basic functions.
Thanks in advance!
Comments
In the button put a rule when pressed change Game.StopFall to true. In the falling actor put when Game.StopFall is true change attribute self.motion.linear.velocityY to 0. You will want to put a rule around your falling rules so it says if Game.StopFall is false then ... and that would surround your gravity/fall rules.