Hi everyone,
I’m making a simple game but I have a problem:
-My jet needs to explode when it collides whit a mine, this works but now i have coins and when the jet collides with a coin in needs to add 1 point.
-How do i make it so that when my jet collides with the mine it explodes and when it collides with the coin it adds a point?
code:
function onCollision(event)
if event.phase == “began” then
if jet.collided == false then
timer.cancel(tmr)
jet.collided = true
jet.bodyType = “static”
explode()
end
end
end