local function loop()
p.rotation = p.rotation + 10
end
Runtime:addEventListener( “enterFrame”, loop )
return p
end
local ob = getObject()
I get no errors in both cases but the object does not rotate in any case.
[import]uid: 21280 topic_id: 5580 reply_id: 305580[/import]
Yep I know this would work but I was thinking of having the rotating functionality encapsulated in the getObject() “object”.
getObject() is a function in separate module, whose purpose is to return as many rotating objects as I need, and they would all rotate on their own without the need to any intervention from the code outside the object itself.
I hope I made it more clear this time what I’m trying to achieve. [import]uid: 21280 topic_id: 5580 reply_id: 19035[/import]