How-to
Reuse a piece with components
Turn part of a screen into a component, use it on other screens, and change every use at once.
Before you start
- Open the screen with the piece in the 2D editor, such as a user interface with a Quit button.
Steps
Click the piece on the canvas to select it.
Press
Ctrl+Alt+K(⌘⌥Kon a Mac). The piece becomes a component, and a use of it takes its place. The inspector shows the use, with the component's name selected: type a name, such asQuit button, and pressEnter.Under Layers, the Components panel lists it: ◇ Quit button, 1 use.
Open another screen. Drag the component's row from the Components panel onto its canvas. The row now says 2 uses.
To change the component, double-click its row. The 2D editor opens the component itself, with editing the component: every use follows above it. Make the change, such as new text, then press
Escto go back.
Check it worked
Every use shows the change: here both the HUD's use and the new one read Leave. Play-test: a use does what the component does. The HUD's Leave still ends the adventure, as its Quit did.

Good to know
- A use's inspector has its Layout (X and Y; its size is the component's) and Edit component.
- A component can have Inputs: values each use passes in, read inside the component as This Component.