Can i use "iterpolate" for actor jump?

venon_itvenon_it Member, PRO Posts: 594
edited November -1 in Working with GS (Mac)
Can i use "iterpolate" for actor jump? how to?

thankss

Comments

  • osucowboy18osucowboy18 Member Posts: 1,307
    I would think so, although I have never tested it. You will probably have to have a timer to control when the actor jumping should come back down. So try a rule like this.

    When condition is true (This could be when touch is pressed, or any other condition)
    Interpolate self.Position.Y to self.Position.Y + X (where X is how much higher you want the actor to jump)
    @ duration X (where X is the amount of time it will take the actor to reach the height of the jump)

    Timer:
    After X seconds (where X is the length of time before the actor starts its return to the ground)
    Interpolate self.Position.Y to self.Position.Y - X (where X is the same value as the height in the previous interpolate behavior) @ duration X (where X is the time it should take for the actor to return to its original position)

    End Rule.

    Again, I think this will work, but you will have to test it and play around with some of the numbers to fine tune it. Good luck, and let me know if you have any questions.

    - Alex
Sign In or Register to comment.