Thanks Gavalakis. On Discord aFoolsDuty offered me a similar solution which is working, so no problem at all with the reply time. 🙂
On a related note (ConditionTasks + events), if a ConditionTask is attached to an FSM state as an ‘exiting’ transition (ie the condition is checked when in that state and, if met, will result in a transition to another state), is the ConditionTask’s OnEnable guaranteed to be called before any of the states ActionTasks are executed?
With your example above (or even Check CSharp Event) the OnEnable subscribes to an event, but I’m curious if that’s 100% safe if one of the ActionTasks in the state could result in the event being raised before the event has been subscribed to by the ConditionTask.
Is the timing of OnEnable execution affected if I have the state’s transition set to ‘Check Continuously‘ vs ‘Check After State Finished‘? Or do those setting only affect when the check of the condition is performed?
Out of interest, if I had ‘Check After State Finished’ set, and the subscribed event fired during execution of the state’s ActionTasks, would the condition be met once the state finished ie NC ‘remembers’ the event has fired? Or would the event have to fire after the state started checking the ConditionTask?
Sorry if this is a lot of questions, just trying to get things sorted in my mind!
Login
Register
By registering on this website you agree to our Privacy Policy.