Docs User guide
Behaviors and items
Make objects do things with behaviors, set up items and the inventory, and design HUDs.
On their own, placed models just sit there. Behaviors make them do things: open, talk, hurt, move, glow. An object can have several behaviors, and they're listed under it in the Explorer.
#Adding a behavior
There are a few ways:
- Select an object and click + Add behavior in Properties, or right-click the object.
- Drag a tile from the Behaviors panel at the bottom onto an object in the level.
- Click a tile in the Behaviors panel to give it to the selected objects.
If the object's model is placed more than once, the editor asks whether you want Just this one or all the copies. Apply to all on a behavior's page copies its settings to the same behavior on every other copy.
The menu shows the six most-used behaviors on top (Message, Dialogue, Pickup, Door / Teleport, Hurts player, Spin), with the rest in groups.
When the player presses E, an object's messages, door and E-triggers run from top to bottom. Use ▲▼ in Properties to reorder them.
#Common behaviors
#Story and interaction
| Behavior | What it does |
|---|---|
| Message | Press E nearby to read text. Give it a Name to make it a character who turns to face you. |
| Dialogue | Starts a conversation from the Dialogue editor (F6). |
| Door / Teleport | Takes the player to another world or tile. |
| Teleporter | Sends the player to another object in the same world. |
| Seat / bed | Press E to sit or lie down. Beds can heal. |
| Sound | Plays a sound when touched, when E is pressed, or on a loop. |
| Music zone | Changes the music near the object. |
#Items and shops
| Behavior | What it does |
|---|---|
| Pickup | Collected on touch and counted on screen, such as coins and gems. Can also heal or restore mana. |
| Chest / container | Press E to open and get its items. Can need a key. |
| Harvestable | Bushes, crops, trees, ore. Pick by hand, or hit it with a tool. Can grow back. |
| Crafting station | Press E for recipes, written like Sword = Iron 2, Wood 1. |
| Shop | Press E to buy. List the stock as Item = price lines. |
#Moving around
Moving platform, Opening door, Pushable block, Conveyor, Bounce pad, Ladder, Swimmable water, Jump-through platform, Crumbling floor, Checkpoint and Patrol path.
#Enemies and danger
| Behavior | What it does |
|---|---|
| Hurts player | Touching it costs HP and knocks you back. |
| Health / breakable | Can be hit or shot, and is destroyed when its HP runs out. Needs tool limits it to an axe, pickaxe and so on. |
| Chase player | Walks toward the player within a range and can attack up close. |
| Shooter | Fires at the player within range: a single shot or a ring. |
| Spawner | Makes copies of a prefab or model while the player is near. |
| Drops loot | Leaves pickups when the object is destroyed. |
#Looks
Light, Particles, Spin, Wind sway, Walk-through (no collision), Face camera (sprite) and Attached HUD.
#Triggers and switches
A Trigger is a behavior for simple logic without code:
- When: the player presses E, touches it, enters the world, or it is destroyed.
- If (all): has an item, doesn't have an item, a switch is on or off, health is below a value.
- Then: actions in order, such as show a message, play a sound, wait, give or take an item, set a switch, remove an object, teleport, heal or hurt, change music, win.
- Otherwise: actions to run when the conditions fail.
Switches are game-wide on/off names, like lever or gate_open. Set them anywhere and check them anywhere. The Sample Village's locked garden gate is a good example.
For anything more involved, use visual scripts. See Scripting without code and the scripting guide.
#Items and inventory
Set up items in the Items panel at the bottom. For each item you can choose:
- a description, an icon model, and a kind: item, money or key;
- what using it does: heal, restore mana or run a script;
- whether it equips as a weapon, a tool (axe, pickaxe) or armor;
- a Held in hand model, and Shoots for a bow or wand that fires a projectile;
- Places, for seeds or blocks that put something on the tile in front;
- its usual price, and whether the Player starts with it.
Drag an item from the Items list into the world to make it a pickup.
In the game, I or Tab opens the inventory, with Use and Equip. The skillbar along the bottom has numbered slots. Keys 1–8, the mouse wheel or a click puts that slot's item in the hand.
#Dialogue
The Dialogue editor (F6) builds conversations and quests as a node graph: Say, Choice, Condition, Action and End nodes. Drag a dialogue from the Dialogue panel onto an object to give it a Dialogue behavior. Mira's dialogue in the Sample Village is a small quest you can open and study.
#HUDs
The HUD editor (F11) designs what players see on screen. A game can have several HUDs, such as a main HUD and a boss bar.
- + Text / Bar / Image / Panel add elements. Drag them on the 1280×720 preview to place them.
- Text can show live values like
{hp},{money},{score}or how many of an item you have, like{Coin}. - Show when hides an element unless something is true, such as
hp < 30. - Drag a HUD onto the World view to show it in that world.
The Skin page restyles the built-in screens: fonts, colors, menu panels, the message box, buttons and skillbar slots. Draw your own frames and icons in Paint (View ▸ Paint).
An Attached HUD floats above objects, for nameplates or enemy health bars.
Next: Playing and testing.