A platform that lifts the player

Hi guys

I am currently developing a 2d platform game where a need a platfrom that the player can walk up onto and be lifted up or perhaps maybe a ladder that the player can climb.

The problem is that i dont know how to code this and i cant really find any examples of it.

Would be awesome if somebody knows how to do this or maybe even has a code example that i can get :)

Thank you all for being Great.

Well a simple case would be where gravity is turned off, then what you would do is when the player collides with the lift platform (create some sort of lift object, make it a sensor). You set the lifts platform velocity to say 10 in the y-direction and also set the players velocity to 10 in the y-direction to create the effect that the lift is pulling the player upwards.

Look up:

1
object:setLinearVelocity(xVelocity,yVelocity)
views:1831 update:2012/2/8 8:46:10
corona forums © 2003-2011