Best way to make an actor STOP

DrGlickertDrGlickert Member Posts: 1,135
edited November -1 in Working with GS (Mac)
I'm making an incredibly simple game where you catch falling objects.

I want the objects to stop falling when the player dies. What's the best way to get the objects to stop?

1. Should I use gravity that slowly goes up as the game goes longer and when the player dies turn off gravity?

2. Should I use some type of rule on each actor (When lives = 0 then MOVE at a speed of 0)?

3. Any other ideas?

Thanks everyone!

Comments

  • simo103simo103 Member, PRO Posts: 1,331
    Hey Doc .. I would do if lives>0 then change your velocity down to whatever value you want and in the otherwise constrain the self.motion.linear velocity Y to zero.

    Hope that helps.
  • DrGlickertDrGlickert Member Posts: 1,135
    Nice. That should do it. Thanks Simo!
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    Do a change velocity to 0 and then a constrain to 0. I have a lot of issues getting GS to always stop actors completely.
  • LumpAppsLumpApps Member Posts: 2,881
    Move atribute overrides all other attributes involving movement (accelerate, etc).
    Simply use a move attribute and set the speed to 0.
Sign In or Register to comment.