Hello,
So if you haven’t seen, I’m working on a platform game. “Bricks/platforms” scroll across the screen, and the player jumps from brick to brick.
I have the scrolling background, and everything pretty much done. But for jumping, I have this:
physics.setGravity(0, 9.8)
local image = display.newImage("monkeyStand.png")
image.y = display.contentHeight/2
image.x = display.contentWidth/2
physics.addBody(image, {density=0.01, bounce = 0})
local function onRelease(e)
image:applyLinearImpulse(0, -0.5, image.x, image.y)
end
image:addEventListener("touch", onRelease)
(Let me remind you I’m the rookie of beginners here, so bear with me)
Im sure you can see what it does. The player jumps from plat to plat, but heres my issue. How do I make it so they can only jump from a platform? Not sure how to implement this…
Also, I thought it would be nice to have the picture change when the player is jumping (to appear as he is jumping) and one when he lands. How would I attempt this? I tried setting a variable to nil, but that didn’t work.
Any help would be greatly appreciated 
Ryley [import]uid: 28237 topic_id: 31868 reply_id: 331868[/import]