Hi there, this one is taxing me a little ...
I have a variable that is sporadically increased throughout the game when certain events occur. It is also constantly reduced by one every 60 frames.
When that variable goes over 60, I would like it to trigger a visual effect
If that variable goes over 80, I would like it to trigger a different visual effect.
My problem arrives when the variable goes to (for example) 90. This would force both the 60 and 80 visual to trigger constantly until the number gets below 80, and then 60.
How can I ensure that if the variable goes over 60, the visual effect only happens once. Then if it goes over 80, that only happens once.
I have a variable that is sporadically increased throughout the game when certain events occur. It is also constantly reduced by one every 60 frames.
When that variable goes over 60, I would like it to trigger a visual effect
If that variable goes over 80, I would like it to trigger a different visual effect.
My problem arrives when the variable goes to (for example) 90. This would force both the 60 and 80 visual to trigger constantly until the number gets below 80, and then 60.
How can I ensure that if the variable goes over 60, the visual effect only happens once. Then if it goes over 80, that only happens once.