Make a player actor,
make a second actor that is the player actor's "feet" (it is invisible, the player follows it, but isn't a parent/child thing.),
make a platform,
Make the feet able to jump, but don't have it be flying,use canJump or whatever variable name u like, Make the jump button do yvelocity=whatever , make a timer that only works once and have it change the yvelocity to what you want next when you want the velocity to change, repeat as you like, make sure the last timer in the jump destroys all the ones before it and itself and changes canJump back to able to jump
create a collison event between the feet and the platform so that the character can only move onto the platform when he is in the air (canJump = 0 or something),
- Code: Select all
If(canJump == 0)
{
physical response here
}
WALLA DONE! The only known problem with this is that if you press enough buttons while colliding with the platform you can go through it. (if you can fix this, YAY!)
Oh and on the demo, arrow keys to move, space to jump.