- Home /
Score isn't adding when the combo timer runs out like it's suposed to, Whats wrong?
If(ComboTimer == 0)
{
Score += addScore * ComboCount;
addScore = 0;
ComboCount = 1;
}
This is what I'm using and when the timer runs out the Score dosen't go up and the addScore remains at its last value. ComboTimer is a float, addScore & ComboCount are booth ints. And this all comes after the stunts that add to the addScore variable. Am I missing something obviuos, cause to me the logic seems sound. This is in C#.
Answer by yummy81 · Feb 11, 2018 at 03:41 PM
It's rather hard for ComboTimer to be exactly zero. Since it's a float so most probably it will never reach this value. Try this:
If(ComboTimer <= 0)
yeah, that's why i put in this statement before it:
if(ComboTimer < 0f || Combo timer ==0f)
{
ComboTimer = 0f;
}
would that still cause my issue. I will however try your idea and see if it works for me. No reason to knock it without trying it.
Edit:
Yeah, that was my issue Thanks!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
WaitForSeconds Not Working 1 Answer
Adding score when enemy dies (Errors) 2 Answers
3 star time base system 0 Answers
Distribute terrain in zones 3 Answers