This code is used to move the player’s .x to the events.
Unfortunately it moves FASTER the furthur away it is. (because the speed comes from the distance to the event)
[lua]function move()
if touch == true then
print(“x=”…eventx…", y="…eventy)
distancex = eventx - player.x
distancey = eventy - player.y
player.x = player.x + 500/distancex
end
end[/lua]
I am never good a things like this
how can I get it to go slower when far away and faster closer up? [import]uid: 79135 topic_id: 14493 reply_id: 314493[/import]
