Hi guys, im really inspired from android game NinJump and im looking to make similar mechanism to my game. I want my game to be harder through the game as long as the player hasn’t died yet (items spawn faster and different various items only appear when we survive the first few minutes).
What i have is like this atm:
[code]function spawn( objectType, x, y )
if gameIsActive == true then
bottle = display.newImage(“bottle1.png”)
bottle.name = “bottle”
bottle.x = math.random(320)
bottle.y = -100
bottle.rotation = 10
physics.addBody(bottle, { density=2.0, friction=0.5, bounce=0.3})
if bottle.y > display.contentHeight then
print(“failed”)
end
end
end
timer.performWithDelay(2000,spawn,60000)[/code]
basically with this, the bottle should “spawn” every 2 secs. Now I honestly don’t know how to make the bottle spawn faster if let’s say the game has been played for few minutes and player still survive…I also would like to create new item (for example: banana) but it shouldn’t start from the very first game but only if the player has survived the first few minutes as well…basically just like the NinJump game where you dont see dynamite when your score is still very low…
how do I set up that kind of mechanism? [import]uid: 114765 topic_id: 20268 reply_id: 320268[/import]