First obvious nub here, but I’m cooking along pretty good, just have these two things I can’t find or figure out.
1st I used the dragme touch example to get some objects I can move around. The problem is that even though you can pull them through other “static” objects, my “character” object just like the boxes in the example stay on the platform even when it is clicked and being moved. An you can therefore cheat or skip over content just by moving the character on the platform. So I basically want the platform to not interact with anything while “clicked” or selected.
2nd
I’ve created motion by just constantly updating the x value my character object (big thanks to Gamexcb his code for d-pad control helped me figure it out). Works pretty well but what I want is when he hits the edge of the screen he turns around and goes back.
This is what I have so far:
[code]
local function move (event) – Moves and updates the Player’s movement
local moveback = false
if hero.x < 400 – and moveback = false
then hero.x= hero.x + 2
end
– elseif hero.x > 400 and moveback = true
– then hero.x= hero.x - 2
end
Runtime:addEventListener(“enterFrame”, move)
[code]
WIth moveback edited out he goes right 400 = x and then stops, but I can’t get him to come back. And I’m sure I’m not probably stating moveback or not asking for it in the right way. If anyone can help me with this simple loop I would be beside myself happy. Thanks again for taking a look.
Nathan [import]uid: 42079 topic_id: 7958 reply_id: 307958[/import]