Conversation
|
That looks very promising ! I will test it fully later this week but the gd.games example build looks very very promising !
|
|
This extension is interesting but I'm not sure to understand how it can be used. For scene switching, I see the "change the scene" actions as transitions already. Scenes usually are changed with a value directly so it can't be a forbidden transitions. Is it for procedurally generated levels that are split into scenes as a maze? I usually do FSM inside a scene. I create a dedicated extension with a condition to check the state and one action to do transition. This way I can easily add new states and eventually add some checks if needed. For more complicated FSM, actions can be added to follow more complex states and maybe handle transitions internally. This last point is very important for FSM on objects. Handling the transitions internally allows a good encapsulation and reusable behaviors. Which is not possible with a general purpose FSM. Can you explain with practical cases how you see this extension being used? |
|
Thanks for your comments. @Oxey405 you can brutally set the state yourself, there is an action for that, and it should not be used bc it will break the state flow. But still doable. You are, or are not in a state, and you can only have one state (per machine) at once, so no heavy calculation here. @D8H there are many practical cases :
|
|
Ping @D8H, it seems you missed the answer from infokub |
|
I have been using this extension for years and it has not been reviewed yet. |
Description
This extension provides a way to manage Finite State Machines for Scene and Objects with a Behavior.
You can:
(help link is broken until i publish the State Machine Editor, which is ready, but i wait the review here to publish it)
How to use the extension
After you added the extension to your project:
Configuration
If you use it for the scene
If you use it on an object
You can also use the State Machine Editor to have a GUI and not do all of this by hand:
https://gd.games/instant-builds/abbfb1bb-1696-4ac5-a839-281f3cfe537f
Manage states
When your machine is started, here are the good practices for an easy use:
You can then group your events by state.
Checklist
What tier of review do you aim for your extension?
Reviewed
Example file
state_machine_editor.zip
Extension file
StateMachine_0.0.1.zip