I can’t find it documented anywhere :/
(question is the title)
found this but can’t get it to work.
function onCollision( event )
--code--
end
Runtime:addEventListener( "collision", listener )
local function listener( event )
timer.performWithDelay(
1000, onCollision )
end
Your issue is one of code order.
functionessentially sets the value for the given symbol. From the Lua manual:As such,
listenerisnilat the time you’re passing it toaddEventListener. Reorder, and it should work: