Behaviours
A behaviour is a logic bundle that controls an object's actions so you can quickly build custom gameplay with no code.
What is a Behaviour?

A behaviour is a bundle of logic that applies action characteristics and identity tags to an object. This controls how it will function in your Experience and how it will be detected by other objects.
Behaviours allow you to quickly build dynamic interactions between objects, with many parameters that can be customised to create unique gameplay. No coding experience is needed!
Examples:
Healer chases and heals an object with a specific tag that needs health.
Melee Enemy chases and attacks a specific tag.
Predator chases and attacks Prey as food, which flees Predator and seeks Plant as food.
A Button can be set up to open a Door when players interact with it.
Timed Events can trigger Weather Switcher to change the time of day, sky colours, clouds, stars, etc. in a preset cycle or based on player actions.
General Uses for Behaviour Types
The behaviour groupings below are how they're often used. However, Farmer behaviour simply allows an object to randomly remove other objects in its path from the game. Think outside the box based on what behaviours can do, and you'll dream up amazing custom interactive play in no time!
Tip: You can select multiple objects and change the same parameters simultaneously.
Tips: Press CTRL+D to duplicate custom objects or groups of objects. Create Side Bar if you must build with them repeatedly or want to spawn them during live gameplay.
No behaviour applied: The object can be a prop or be interactive if Components are applied.
NPCs
An NPC is usually a person, creature, etc. When this type of behaviour is applied to an object, properties are included to create interactive potential:
🏷️ identity tags, which allow other objects to detect it
🎯 tags to detect on nearby objects and respond to (flee, attack, heal, food, or gather)
Modify object tags and the tags their behaviours are set to detect for custom interactions.
Behaviours
Citizen: Passive walking object, flees Hostile tag by default.
Farmer: Passive walking object, harvests Plant tag and flees Hostile tag by default.
Melee Enemy: Chases and attacks Avatar tag by default. Has Hostile tag by default.
Healer: Restores health. By default it flees Hostile and seeks Friendly and Avatar tags.
Plant: Prey and Farmer seek its default Plant tag. No death visual effects when "killed."
Predator: Chases and attacks Prey and Avatar tags and has Hostile tag by default.
Prey: Passive walking object that seeks Plant tag and flees Hostile tag by default.
Soldier: Passive walking object that attacks when it is attacked or detects a Hostile tag.
Experience Management
Animated Decoration: Plays specified animations, each followed by a message.
Actor Property Switcher: Change physics of objects in range during play.
Message Broadcaster: Precisely control how to send a message, can repeat forever.
Timed Events: Sends messages after parent and sub-event timers; linear logic, loops.
Player Engagement
Asker: Pop up box posing a question with 4 answer options that each send a message.
Button: Sends a message upon interaction.
Crowd Event: Emotes or messages reach a collaborative goal; success or fail messages.
STREAMING BEHAVIOURS
Uploading custom content for use with Video and Audio Streaming behaviours is currently limited to The Sandbox and select partners. These behaviours are in development for widespread public use.
Experience Ambience/Feel
Post Process Effects: Visual modifier for the camera with various effects to customise.
Weather Switcher: Changes environmental ambience (sun, stars, clouds, etc).
Add or Destroy Blocks, Assets & Avatars
Asset Spawner: Spawns a specified asset (can offset).
Replace Asset: Switch an asset to a different asset.
Multi: Spawns a specified block in a defined space (3x3 or larger) around the object.
Void: Destroys specified blocks, assets, or avatars within a defined space.
Motion-Based
Bird: Flies clockwise in a circle. Randomise movement with height and width ranges.
Basic Platform: Moves back and forth in any direction, can face the direction of motion.
Door: Plays door animations, allows entry; rotates 90 degrees and back at its pivot point.
Add a Behavior to an Object
One behaviour may be applied to an object to control its actions. Many Components can be applied to an object to make it more interactive.
Left click to select an object. This will open the Properties Panel on the right side of the screen.

Beneath Attributes, click on the Behaviour field where it says NONE or displays the currently applied behaviour.

A window named Select Behaviour will pop up with available options. In this example, we’ll choose the Soldier behaviour. The Select Behaviour window will close, and the chosen behaviour will now appear in the Properties Panel along with its default settings.

In our Soldier behaviour example, default logic is automatically added, including:
the Patrol Zone of the entity
the Walk Speed, Run Speed, Attack Damage and Attack Speed
Tags to Attack is set as Hostile
a Health Component which allows the soldier to receive damage if attacked
tags so other objects with can detect it with their behaviours

Click the Edit Logic button to see the full Behaviour & Component Parameters for any behaviour and components applied to the object. Here you can see how the object will work in your Experience and customise parameters such as Walk Speed, Tags to Attack, Message sent on death, etc. You can also scroll to the bottom of the object's properties and change its identity tags so it will be detected specific to your game's mechanics. Test your logic frequently by presssing the TAB key to toggle on and off Play mode.

If you need to go back to the default view of the Properties Panel, click the X next to Logic at the top. Your settings will not be lost.

Movement
Bird
Medium
Movement
Door
Movement
Advanced Platform
Movement
Projectile
Movement
Basic Platform
Last updated
Was this helpful?

