🔹Behaviours
A behaviour is a logic bundle that controls an object's actions so you can quickly build custom gameplay with no code.
Last updated
A behaviour is a logic bundle that controls an object's actions so you can quickly build custom gameplay with no code.
Last updated
Copyright © 2012- 2023 The Sandbox. All Rights Reserved.
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.
OBJECT LOGIC
Behaviours relate to object or Experience actions. An object may have only ONE.
Components relate to player actions. An object may have one of each type.
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.
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 Presets 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.
An archetype is a typical example of 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.
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.
CUSTOM INTERACTIONS
Examples:
⚔️Create barbarians to attack Soldiers. Apply Melee Enemy behaviour with Tags to Attack set as Soldier. Apply Soldier behaviour to objects (includes Soldier tag).
🗑️ Create volunteers to remove garbage. Apply Farmer behaviour with Gathering Tags set as Trash. Apply Plant behaviour to various objects, adding the Tag Trash.
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.