Hi, having trouble getting this right,
function onCollision(event)
if(event.object1.myName == “player” and event.object2.myName == “tree”) then
event.object2:removeSelf()
end
end
Runtime:addEventListener( “collision”, onCollision )
I want this collision to perform with a timed delay, have tried placing timer.performWithDelay but with no success.
Collision works perfect with removing the object but I want the object to be removed after a certain time and want the collision to trigger once.
Tree is set to isSensor = true.
[import]uid: 165082 topic_id: 33721 reply_id: 333721[/import]