I would like to find a way to reset my sequence evaluator in my startstate whenever the state is entered. At the moment I’m doing it in OnBecomeRelevant (like the lyra sample) but that only triggeres when the state is entered with no weight before it entered it. But I have a case where it’s entering the state while it’s still having weight / relevant which causes my function not to run so it doesn’t reset the sequence evaluator.
I’ve looked into the State setting called “Always reset on entry” but that doesn’t seem to work for sequence evaluators or I’m doign something wrong.
Yeah, unfortunately, OnBecomeRelevant only works once the state has fully blended out, even with that flag set. Some other elements of the tools also don’t work together; for example, AlwaysResetOnEntry doesn’t explicitly work with SequenceEvaluator’s Reinitialization Behaviour options.
So there are a few potential bugs or unsupported workflows here, so instead I’ll make a recommendation on a pattern.
In your sequence evaluators, tag them with a name so you can access them elsewhere.
Make sure to set your Explicit Time variable to dynamic. (So you can use SetExplicitTime.)
Use an OnUpdate function for both your sequencers to increment your accumulated time by delta.
Then, in the final step, use the state’s OnStateEntry function to reset your accumulated time on the SequenceEvaluator node. This function always fires on state entry, even if it’s not fully blended out.