Skip to main content

Instances

An Instance can be seen as a level inside your level. They are very useful if you need to build or script the same thing multiple times. A good example would be a door that can be opened by AI or a power box that can appear in random locations.
ble_instance_level2.jpg

InsteadSince an Instance is basically it's own level, editing it will also affect each spawned-in instance of havingit, tothey buildare and100% scriptidentical. it multiple times, you do it once and either spawn the instance multiple times or move it using InstancePoint Elements. ble_instancepoint.jpgble_instance_preview.jpg

In gameplay, you won’t notice any difference between Instance and regular Units in your level.

Spawning

You can either use vanilla instances, or make your own custom ones, in both cases you can find them in the “Instance” tab in the Spawn Menu.

Create A Custom Instance

To create your own Instance, simply open your Map in the Project Manager, add a new module, select “Instance” and give it a unique name.
ble_instance_module.png

You can now open your new Instance like any regular level and edit it. While scripting your Instance, you can set up InstanceInput and InstanceOutput elements to send signals between the instance and your level.
After spawning the Instance in your level, you can send signals to it using the InstanceInputEvent Element in your level, and receive signals from the Instance with InstanceOutputEvent Element. ble_instance_event.png

Keep the amount of elements below the Instance Index size, which is 250 by default. It can be increased if necessary, though it’s better to keep your instance size as small as possible.
The Index size is basically the amount of element IDs in your level's script that are reserved for the Instance.

While editing your Instance, you can build navigation and place PlayerSpawner Elements to playtest it. However, the generated navigation will not carry over to the main level, and all PlayerSpawner should be disabled when finished editing.

Instance Point Element

Instead of having to build and script it multiple times, you do it once and either spawn the instance multiple times or move it using InstancePoint Elements. ble_instancepoint.jpg