Skip to content

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.