Components
Components are reusable behaviors you attach to scene objects. An object can carry many at once. Each one exposes inspector fields, Flow actions and events, and — for native types — an OpalScript class you look up with GetComponent.
If it's your first time using components, start here:
- Getting started — attach Health, a health bar, stats, and teams in the editor
- Components and properties — add, configure, and wire components from Arrange
- Built-in reference — every shipped field, action, condition, and event
Most games never leave the inspector and Flow. Custom types are Behavior Components in Script Studio — you do not edit engine source. When a graph needs reusable code, the Scripting API lists the native classes.
Featured content
Walk through a battle setup: HP, health bars, stats, teams, and turn order — no code.
Look up shipped components: fields, Flow actions, conditions, and events.
Author reusable custom components in Script Studio. They appear in Add Component once they compile.
Call component actions and conditions from graphs. Events start rules.
OpalScript class for HP, damage, and healing. Attach Health in the inspector, then GetComponent.
OpalScript class for physics bodies. Pair with Collider 2D in the inspector.
OpalScript class for tweens, bounce, and shake. Inspector Motion still drives the transform.
Where to work
| Editor area | What you do there |
|---|---|
| Arrange inspector | Browse, add, remove, and configure components on selected objects |
| Scripts workspace | Create Behavior Components and OpalScript classes |
| Object Flow | Use component action, condition, and event nodes |
| Play | Components run; inspect live values |
Additional resources
- Components and properties — when to use a component vs a graph
- Class index — every OpalScript class, including native components
- Physics and collisions
- Visual scripting