Hi, i need to call a function into another function, how can i do that?
This is my code
local onUpdate = function(event)
local vx,vy = player:getLinearVelocity()
if math.abs (vy) \<= 40 and math.abs (vx) \<= 40 then
--Here i would like to recall my other function "changeDir"
else
end
map:setTrackingPoint(player)
map:update(event)
--
end
Runtime:addEventListener("enterFrame", onUpdate)
local changeDir = function (event)
end
It should be really simple, but i can’t!
Please, help me, i need to recall my function many times in my app.
Thanx!!
Paolo
[import]uid: 30837 topic_id: 6713 reply_id: 306713[/import]