Comment on page

What is a Behaviour?

Determine how an entity behaves and interacts with other entities in your experience.
Behaviours in The Sandbox Game Maker are packaged variables, or a collection of game logic bundled together, that control how an object will function in your experience.
You can use these logic bundles to create archetypal characteristics and interactions you might be familiar with in existing games such as Healers, Citizens, or Soldiers, as well as parameters for objects such as Platforms and Doors, all without you needing to code how they interact.
Using Behaviours takes the heavy lifting out of building your experience. Within just a few simple clicks you can start creating without the need for a complex setup.
Only ONE Behaviour can be assigned to an Object at a time.
What's more, is that these behaviours are also packaged to respond in a variety of ways depending on their proximity to other objects and the behaviours they have.
For example, if an object with the Plant behaviour is in the same area as an object with the Prey Behaviour, then the Prey will automatically identify the object with the Plant Behaviour as a food source when its hunger levels run low.
A similar relationship occurs if that same object with the Prey behaviour is in close proximity to an object with the Predator Behaviour. In this case, the default Predator settings set Prey as their target, and so they will actively search out any nearby objects with the Prey behaviour applied. In turn, the Prey Behaviour is pre-set to flee from any object with the Predator behaviour.
You can see from this example that some dynamic interactions can be established very quickly, and that, with just a few Behaviours added to your chosen objects, you have the makings of a food chain in your experience.
These are just a few examples of Behaviours that will help you create your experiences right out of the box. However, this is just the beginning, you can change tags and messaging using the Behaviour settings to create intricate customised relationships and functions.
Before we get into the details, let's first look at how you add a Behaviour to an object.
Last modified 2yr ago