Thanks for the comment! This behavior is designed to simplify basic State Machine logic. Think of it as a dedicated variable manager for your object's states.
Here is a quick text tutorial (Enemy AI example):
- Add the behavior to your Enemy object.
- In the behavior properties, enter your state names into the States list separated by commas (no spaces, no quotes, example: Patrol,Chase).
- Create events for what the enemy should do in each state:
- Condition: Is state "Patrol" -> Action: Move enemy left/right.
- Condition: Is state "Chase" -> Action: Move towards player.
- Use actions to switch states based on triggers:
- Condition: Distance to player < 200 px -> Action: Set state by name to "Chase".
- Condition: Distance to player >= 200 px -> Action: Set state by name to "Patrol".
I currently don't have a plan for a video, but if you use it to manage logic modes like this, you will find it very useful!