Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Stopping an actor falling with a stop button

EsayemEsayem Posts: 8Member
edited August 2012 in Working with GS (PC)
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!


  • simo103simo103 Posts: 1,331Member, PRO
    edited August 2012
    @Esayem .. create a Game.attribute (boolean) named something like Game.StopFall.

    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.
  • EsayemEsayem Posts: 8Member
    Brilliant thanks!
This discussion has been closed.