Hi
I need a little help
What I 've done:
but this code do not count first time because first prevTime= 0
Maybe I should use tables ?
local prevTime = 0
if event.phase == "began" then
local timePassed = system.getTimer() - prevTime
prevTime = prevTime + timePassed
if timePassed \< 300 then
ballCount = ballCount + 1
print(ballCount)
end
end
Any ideas guys ? How you make combos or bonus in yours games, when user hit something very fast couple times ? [import]uid: 13156 topic_id: 20659 reply_id: 81243[/import]
I done this but then when for example 5 balls hit the wall it will measure correctly time between collisions except first one.
I need to give bonus when exactly 5 balls hit the wall in very short interval of time
Edit*
Sorry you are right, i need the time between first one and second one and so on…
The time between first collision and prevTime doesn’t matter. The problem is with counting balls in a right way I guess. [import]uid: 13156 topic_id: 20659 reply_id: 81252[/import]