Hi everyone.
I’v been making my first game for a few months now and
i am very pleased with the progress i am making, considering im
total amateur with mimimum time invested in actual learning to code.
I want to improve my game with a combo bonus score but i just
can’t find a solution to the problem.
Hopefully someone knows how to deal with this:
Scoring is based on function detecting collision.
function addScoreOnCollision1(event)
if (event.phase == “began”) then
if object1.myName == “blue” then
addToScore()
end
end
end
function addScoreOnCollision2(event)
if (event.phase == “began”) then
if object1.myName == “red” then
addToScore()
end
end
end
and so on…
Now, the question is, how to get bonus score if player hits
blue-red-blue-red in a row for example?
Cheers, SvenStp.