can someone explain this expression?

1UpGamestudio1UpGamestudio Member Posts: 213
edited November -1 in Working with GS (Mac)
Can someone explain the meaning of this expression?
thanks!!!

Change Attribute: self.Motion.Linear Velocity.Y To: random(70,120)*(-1)^(random(1,2))

Comments

  • bradhermanbradherman Member Posts: 55
    self.Motion.Linear Velocity.Y
    An objects Y (up / down) velocity (Speed over time) is to a random number between 70 and 120.
    That value is then made negative (-1)
    so -70 to -120
    then that is taken to either an exponent of a float between 1 or 2
    so -70^-1 or -70^2 to -120^1 or -120^2
Sign In or Register to comment.