News:

MFG's Character of the Month: October 2026 Nominations

Main Menu

Variable countdown

Started by Liero, September 24, 2009, 08:57:34 PM

Previous topic - Next topic

Liero

I need a way to test if a variable is counting down.  What I have is a variable that loses one unit per frame and based on certain events is set to certain numbers which then activate events.  What I don't want is the event to activate when the variable is counting down; but only when the variable is set to that number.  Is this possible?

PotS

If you just want to check what the var is up to you can use
DisplayToClipboard
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

Byakko

Can't you make a workaround by checking what makes the variable count down to begin with ? If you expect the variable to have a fixed value at some point, you have to know when the variable is supposed to count down : just determine the case when you're not making it count down.
Otherwise you can maybe try another variable that records the value your variable had on the previous tick, and just see if the two are equal - i.e., if the variable you want has not changed since last tick. For that, have that new variable take the new value only at the end of your file (end of your statedef -2), after you're done checking if the two have the same value.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.