Hey guys I was wondering how I would make it so after the user collects the item they need to build it it will put it in there inventory then they can craft with it and build with it later. Think 2d minecraft right now the user can collect the wood and it adds it and knows how much the user has but how would you make it craft and be able to build by touching where you want the block to go. Thanks Tyler Jacobson
----------------------------------------------------------------------------------------- -- -- main.lua --Add images later ----------------------------------------------------------------------------------------- local physics = require("physics") physics.start() -- your area is basecamp -- making the player --vars for player local woodamount = 0 local woodicon = display.newImage("woodicon.png",350,20) local tree = display.newImage("tree1.png",300,226) local tree1 = display.newImage("tree1.png",390,226) local woodamountdis = display.newText(":"..woodamount,380,20,nil,20) woodamountdis:setFillColor(0,0,0) local function myTapListener( event ) if ( event.numTaps == 2 ) then print( "object double-tapped = "..tostring(event.target) ) display.remove(event.target) woodamount = woodamount + math.random(1,5) print(woodamount) woodamountdis.text = woodamount else return true end end tree1:addEventListener( "tap", myTapListener ) tree:addEventListener( "tap", myTapListener ) if woodamount\>= 4 then canmakeplanks = true end