Parallel Behaviors
Learn the two main ways to run behaviors in parallel in PlayMaker:
Multiple FSM Components and Regions inside a single FSM.
FSM Components
Use multiple FSM Components when behaviors are modular, reusable, or need to be attached to different objects.
For example, a Damage FSM that tracks health and applies damage could be reused across enemies, players, or destructible props. It makes more sense to keep this logic in a dedicated FSM instead of nesting it inside a region of another FSM.
β Best for:
- Modular systems like Health, Audio, Input
- Prefabs with shared behavior
- Cross-object communication
Regions
Use multiple Regions when behaviors are tightly coupled, share variables, or are part of the same parent state.
For example, an AI FSM could run both Fight and Flight logic in parallel - whichever finishes first determines the next action. Because these behaviors interact and depend on shared context, it makes sense to implement them as regions.
β Best for:
- Coordinated logic (e.g. decision-making + timers)
- Behaviors that need shared data
- Logic that starts/stops together with a parent state
Comparison
| Use Case | FSM Components | Regions |
|---|---|---|
| Modular & reusable | β Yes | π« No |
| Shared variables | π« Requires global variables | β Direct access |
| Tied to parent state | π« Independent | β Runs while parent is active |
| Coordination between parts | π« Needs global events or variables | β Naturally synchronized |
Still not sure? Ask: βWould this behavior ever be reused or moved to another object?β If yes, use an FSM Component. If no, and itβs deeply tied to the surrounding logic, a region may be a better fit.