Guy’s I have two buttons that move the character up/down. I don’t want to use physics to create boundaries. I want when the user taps the up button it goes up 30 pixels and then disables itself until the objects is lower 30 pixels. The same for the down button.
local moveDist = 10;
local OnTrack = function ()
if(player.y \< 200) then
moveDist = 0;
else
moveDist = 10;
end
end
Runtime:addEventListener("enterFrame", OnTrack)
Right with this code the player still goes above and I guess it never moveDist never gets set to “0” [import]uid: 53149 topic_id: 11564 reply_id: 311564[/import]
(Satisfying, right?)