Slow Down Ball!

daniel.robert.campbelldaniel.robert.campbell Member Posts: 251
edited November -1 in Working with GS (Mac)
I'm having a problem with the ball in my game. It bounces around but sometimes will start bouncing back and forth and get faster and faster until it is just a crazy blur that sometimes escapes the level. I'd really like to cap it's max speed. I have tried playing with the "max" command...but I clearly don't know how to use it correctly.

For the 1,000,000th time...sorry for being such a noob. :-(

Comments

  • ktfrightktfright Member Posts: 964
    You can set the ball actor's Max Speed attribute to a number that wont exceed infinitely. its in the motion tab in you ball actor's editor.

    Hope that helps.
  • Sweet. Thanks! :-)
  • RHRH Member Posts: 1,079
    By the way, just a note about the 'max' and 'min' functions. They actually do the opposite to what they first appear to do, although it makes sense when you hear it.

    In the case of creating a max speed, you will need to use the minimum function. For example `constrain attribute self.motion.X to min(300,self.motion.X)`. This will limit the the X velocity to 300 as it is actually saying constrain it to the smallest value of the two.

    Hope this made sense. Took me a while to figure it out. It's all here by the way http://gamesalad.com/wiki/interface_reference:expression_editor
Sign In or Register to comment.