Level Editor/Entities/Zone
| Zone | |
|---|---|
| Made with | Any brush, with Is Area ticked in the inspector |
| What it is | A volume the gamemode and outputs react to: a capture point, a spawn room, a hazard, a trigger |
| In the game | Only its shape: invisible and not solid in the game |
A zone (also called an area trigger) is a volume of space that something reacts to when players go in and out of it: a capture point, a spawn room, a deposit area, a hazard, a trigger that opens a door. Any brush can be a zone, so a zone can be the exact shape of a room, carved and clipped like any brush.
Making a zone
- Build a brush of the shape you want with any shape tool.
- With it selected, tick Is Area in the inspector. The brush is no longer solid or visible in the game; it only marks out space.
- Set Trigger Name to the name your script or outputs will use, for example
Capture Point. Left blank, the brush's own name is used. - Set Zone Team if the zone belongs to a team (0 means neutral).
Zone brushes draw translucent in the editor (Area Trigger Opacity in Settings). View > Show Zones hides them all; Edit > Click Through Zone Brushes lets you click what is behind them.
Inspector
These appear once Is Area is ticked, under the brush settings.
| Setting | Type | Default | What it does |
|---|---|---|---|
| Trigger Name | Text | empty (the brush's name) | The name a gamemode script matches and outputs target. Several zones may share it (one Spawn Room per team); Zone Team tells them apart. Names are matched exactly, capitals and spaces included. |
| Zone Team | 0 to 8 | 0 | Which team the zone belongs to. 0 is neutral. |
| Use Prompt | Text | empty | Makes the zone usable: the HUD tells a player standing in it to press the use key for this ("Change the dummy's loadout"). A press fires the zone's OnUse output and the script's _zone_used. Leave it blank for a zone nobody uses.
|
| Team Differs Per Side | Check box | On | A Mirror Node's copy of this zone belongs to the other team. Untick it for a zone both halves share. |
| Outputs | Outputs panel | none | What the zone fires, and at whom, when players come and go. See below. |
Outputs
A zone works without any script through its outputs. Events it fires:
- OnEnter: a player came in.
- OnExit: a player left it, or died in it.
- OnFirstEnter: a player came into it while nobody stood in it (for an output with a Team, while nobody of that team did).
- OnLastExit: the last player left it (or the last of that team).
- OnUse: a player pressed use in it (a zone with a Use Prompt).
Inputs it takes: Enable, Disable and Toggle. A disabled zone fires nothing, though who stands in it is still counted and a gamemode still hears about it.
Outputs reach a zone by its Trigger Name. See Outputs and logic.
In the game
Only living players count, by the point they stand on. A zone placed in a moving platform moves with it, so a lift can carry a capture point. A payload cart carries a zone of its own.
For how scripts use zones, see Zones in scripts.
WorldBoundary; that name belongs to the World Boundary.