Detecting Speed...

TouchTiltGamesTouchTiltGames Member Posts: 1,162
edited November -1 in Working with GS (Mac)
Looking for the proper expression to spawn an actor based on the speed of a moving object.

So I've got: If game.speed < (need speed min/max expression)
spawn actor

I found one on the forums but it was for size vs speed.

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    You have access to the Motion.Linear.X and Motion.Linear.Y attributes of an Actor. Those are its current velocities...

    So:

    Rule
    When all conditions are valid:
    self.Motion.Linear.X > 20
    -----[do something]
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Oh sweet! Thanks a lot really appreciate that :D
  • firemaplegamesfiremaplegames Member Posts: 3,211
    Sure. I would throw a Display Text on the Actor first, that displays the current speeds, so you know what numbers you are working with.
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Ok I will thanks! Good way to test.
Sign In or Register to comment.