how can i increase something every time you 5 object is collected

hi
i wanna make a rule for my game where everytime you collect 5 objects, you will increase 15 secs and level up

this is what i have coded but the problem is that i reliased is that it only increases when the statue collection is on 5 and not every 5

Hello @emir143 ,

You can replace your branch checking to something like this

In the image above, what the node do is, if Statue Count % 5 is 0 then it will return true for the condition.

all Multiplication of 5, if it is modulated by 5, will return 0. Example below:
5 % 5 = 0
10 % 5 = 0
15 % 5 = 0

905 % 5 = 0

7 % 5 = 2

OR another solution, You can also create a variable for the counter that will be increased by 1 when you collect statues, and if it 5, will start timer and else, and also reset the counter to 0 again.

yep both of your answers helped, it works. thank you for the help

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.