How can I compare two values every X seconds, if less than transition to next state?

fotoshopt 2 years ago updated 2 years ago 4

I've got the following graph in a transition between one state to the next. I want to compare the two numbers every X seconds, and if so, trigger the next transition.

I just bought Bolt, did the entire official tutorial and for some reason I just can't seem to make sense of this.

I do know C#. I'd probably do this in a coroutine normally. 

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

hmmm... tricky.  The On Timer Elapsed unit only triggers once until it is reset (by reentering the state).  There is no other mechanism offered to reset it.

However, 1.4 has two new units that are already done and ready to go.... but 1.4 isn't out yet.  These are:


However, since they're not here yet, I threw together a quick update to the Community pack, where you can find On Every X Seconds, which does what you want, I believe.  (the rest of your graph looks correct, you were just missing the "every" part of X Seconds :-)

you can get more details on the community pack here:

Thank you for this! Works well!


Indeed, right now it's a tricky problem, but once 1.4 is out it could be solved like this:

Thank you. I was able to achieve what I was after using the community pack . 

Once 1.4 has been released, would it be more efficient to use yours graph above to solve this problem?