Transitioning back the a previous state #13
-
Hello, first of all I want to say: great work, I really like your plugin! I love to integrate my paper sketches in the editor with your UI and I like the triggers/parameters mechanism (my previous state machine was little more than a stack that I controlled from my game code) My gamedev experience is basic and all self taught, so maybe my question could sound silly to you. Let's take the example of an Ant's fsm: The "Flee" state can be reached transiting both from "FindFood" and "GoHome" states, when some danger is near the ant. But when I set trigger "danger_is_far" to go back to the previous state, my ant goes anyhow back to the "FindFood" entry state. Should I manage the stack manually in this case, or is it automated and I simply am missing something? Thank you for your work and your attention |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Thank you! This issue is not silly at all, in fact, it address the current limitation of this plugin - no way to sort transition. Current workaround would be using different parameter name, for example, "safe_to_go_home" or "safe_to_find_food" to avoid this racing issue. I always thought priority in transition doesn't matter that much, but now, I would consider adding it on next update. |
Beta Was this translation helpful? Give feedback.
-
Oh wait... Sorting transition doesn't actually solve this racing issue, it will only make it biased to the transition with higher priority... This issue is more of a flaw in the design, as "Flee" is responsible of making decision whether to "GoHome" or "FindFood", so using different parameter name, for example, "safe_to_go_home" or "safe_to_find_food" should be the cleanest way to achieve what you are trying to do. |
Beta Was this translation helpful? Give feedback.
Oh wait... Sorting transition doesn't actually solve this racing issue, it will only make it biased to the transition with higher priority...
This issue is more of a flaw in the design, as "Flee" is responsible of making decision whether to "GoHome" or "FindFood", so using different parameter name, for example, "safe_to_go_home" or "safe_to_find_food" should be the cleanest way to achieve what you are trying to do.