Hello everyone,
does anyone here know how to create a WINSTREAK BONUS based on levels?
Pass 5 levels without loling, and at the end, after 5 levels I give a bonus to a player?
What could be a winstreak logic?
Thank you!
Hello everyone,
does anyone here know how to create a WINSTREAK BONUS based on levels?
Pass 5 levels without loling, and at the end, after 5 levels I give a bonus to a player?
What could be a winstreak logic?
Thank you!
You just log how many times the player has won in a row. I’m not sure what the issue here is.
well how would you do this?
int wonInRow = 0;
[...]
wonInRow = didPlayerWon ? wonInRow++ : 0;
[...]
if (wonInRow == 5)
{
wonInRow = 0;
GivePlayerBonusSomehow();
}
Not sure what is it you don’t understand exactly…
You do it the same way you would do anything else in programming: you break it down into simple steps and then you solve those steps. In this case you store a variable in a script. If the player wins you increment it. If the player loses you reset it. Once the variable hits the desired value you perform an action.
Thank you all! I did not understand the CONSEQUENT WIN part. How to program that? I know the rest but the CONSEQUENT LEVEL WIN is something I cannot figure out… I will try the suggestions above, and thank you for your time and effort in responding ![]()
If the player wins, you increment a number by 1. If they lose, you reset it to 0.