Hey guys I was wondering how do you make it (for example in the game im making) have trees in the scene and when you tap them a certain number of times only the tree you were tapping with be destroyed and wood will be added to you inventory.
Thanks Tyler Jacobson
--This only the code that applys to this topic local woodamount = 0 local tree = display.newImage("tree1.png",300,226) local tree1 = display.newImage("tree1.png",390,226) local function chopdowntree (event) tree:removeSelf() tree1:removeSelf() end tree:addEventListener("tap",chopdowntree) tree1:addEventListener("tap",chopdowntree)
