Level
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.
Since an Instance is basically it's own level, editing it will also affect each spawned-in instance of it, they are 100% identical.
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.
Alternatively you can also clone a vanilla instance and edit it.
You can now open your new Instance like any regular level and edit it, or open it from inside your level with the Edit Instance button.
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.
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.
Additionally Instances can only have the default world continent and default script.
Instance Point Element
Instead of spawning an Instance multiple times, you can move one using the InstancePoint Element. This is especially handy for randomizations, as you won't have to deal with linking multiple Instances, you simply spawn it once and move it where it's needed.
InstancePoint Elements can only link to Instances that have the "Mission Placed" option toggled on.
Now you simply have to execute the element and the Instance will appear at the exact position and rotation of the element.
Mass Units (Brushes)
Mass Units, or brushes, allow you to add more detail to your level with relatively little impact on performance. They are set-up to automatically fade in and out at certain distances. There are lots of different Brushes you can use, from trash and debris, to leaves and grass, graffiti, rocks and so on.
Access the Brush editor by navigating to the World menu and to the "Brush" tab.
In the top part of the menu you can change how your brushes are placed in the world:
Random Roll: Rotates the unit by a random amount when placing, between 0 and the specified value.
Radius: Determines the size of the brush. Can also be changed by scrolling your mouse wheel.
Height: Controls the height of the brush.
Angle: Controls the rotation of your brush relative to the camera.
Offset: Determines the offset distance of the unit, relative to the surface you’re pointing at.
Density: How many units per square meter should be spawned.
Pressure: Determines how many units get spawned per frame.
Pressure Erase: When enabled, uses the Pressure value for erasing units.
Erase with Selected Unit: Enable to only erase the currently selected unit.
Override Surface Normal Rotation: When enabled, spawned units will ignore what direction the surface is facing, and spawns the unit in their default rotation.
Brush on Editor Bodies: When enabled, will place brushes on editor units, otherwise the cursor will just phase through them.
Visible: Toggles the brush cursor.
On the bottom part you can select which brush to use and even select multiple at once by holding CTRL when selecting.
Now simply move your cursor around in your level and place the brushes by clicking LMB and remove them by pressing RMB.
Mass Units can not be enabled or disabled mid-heist, so it’s better to place them in areas that won’t change during gameplay.
Optimization - Improving Performance
There are lots of ways to Improve performance on your level. For a start you can try to not over-detail your level. Adding lots of detail to make your level look interesting is not a bad thing, but overdoing it, especially in areas it’s not necessary, can backfire on you with low FPS.
Additionally you should use low-quality assets for areas that are out of bounds. Those usually have backdrop
, bdrop
or background
in the name.
But most important are Occluders and Portals:
Occluders
Occluders are invisible planes that, when looking at them, prevent Units behind it from being rendered. They are usually placed inside walls.
You find and place those like normal Units in the Spawn Menu and you can see them using the “Draw Editor Units” setting.
Portals
Portals are shapes in your level with Units assigned to them. Those Units will only be visible if the player is standing inside the shape, otherwise they will not be rendered.
You create Portals by navigating to the World Menu and the Portal-Tab. Create a new Portal by clicking on the "Plus" icon.
Select your portal and add shapes, those indicate the area the player has to stand inside to see the Units linked to this portal.
Now you can add individual Units to the portal by selecting them and clicking the “Add to current portal” button in the quick actions.
You can also use the button to automatically add all Units that are inside the shapes.
Units that are linked to your current selected Portal have a red box around them.