0 votes


i'm trying to implement a fsm for my already started project (that has horrible spaghetti code). I made a diagram so you could see what i'm trying to do but i do have some trouble with a few things.
enter image description here

ok so as it's said in the diagram, transition only occurs when a certain condition is met (i'll put it at the top of the do function) and not really to event. I guess i should use signals but i don't know if i should mix both conditions and signals or switch fully to signals. Also about signals, i have a hard time trying to visualize how it would go at runtime and i don't know if it's a really good idea to hook my states to a bunch of signals and then let some code execute (and the states would have to have a ref. to the fsm node that'd make a lot ref. inside a lot of nodes) and most importantly i don't know if it would fit with the current diagram even though i know it should be the logic to adopt (events that triggers transitions).
Ok that's it if you have any suggestion or help to offer...

in Engine by (12 points)
retagged by

comment to get notified about this question since I am interested in the same thing.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.