I am following this tutorial
https://www.youtube.com/watch?v=duYjS1AVAOE
The code that I want to ask about is this
mine1 = display.newImage("mine.png") mine1.x = 500 mine1.y = 100 mine1.speed = math.random(2,6) mine1.initY = mine1.y mine1.amp = math.random(20,100) mine1.angle = math.random(1,360) physics.addBody(mine1, "static", {density=.1, bounce=0.1, friction=.2, radius=12}) screenGroup:insert(mine1) mine2 = display.newImage("mine.png") mine2.x = 500 mine2.y = 100 mine2.speed = math.random(2,6) mine2.initY = mine2.y mine2.amp = math.random(20,100) mine2.angle = math.random(1,360) physics.addBody(mine2, "static", {density=.1, bounce=0.1, friction=.2, radius=12}) screenGroup:insert(mine2) mine3 = display.newImage("mine.png") mine3.x = 500 mine3.y = 100 mine3.speed = math.random(2,6) mine3.initY = mine3.y mine3.amp = math.random(20,100) mine3.angle = math.random(1,360) physics.addBody(mine3, "static", {density=.1, bounce=0.1, friction=.2, radius=12}) screenGroup:insert(mine3)
Now when the plan goes up, it blows, i don’t want it to blow no matter how high it goes, i just want to to blow if it hits a mine, how to do so