GTG Safe Zone
Building a safe zone of any shape
A protected area made from placed corner points. Inside it the people it protects cannot be hurt, and while it is quiet nobody can fire, throw or swing. Around it lies a ring: when an enemy enters it, the action locks drop for everyone. These pages explain how such a zone is built in Arma Reforger, and where the obvious versions break.
How to read these pages
Every page is one problem: what goes wrong with the obvious approach, the technique that works instead, and a short
example. The examples are written for this documentation – simplified, with neutral names (MyAD_) and
example values. They show the technique, not the source of the mod.
Points to polygon
Corner points placed in the world become an outline, and a ray tells you whether a position is inside it. Concave shapes included.
The alarm ring
A ring around the outline as a distance test to the nearest edge, not as a second polygon.
Place and faction
Protection is not only about where you stand. An enemy inside the zone stays killable.
Invulnerability
Discard damage per hit with HijackDamageHandling, and why not switch damage handling off.
Alarm and replication
Each zone runs its own alarm and replicates it through its own RplComponent. No manager.
Blocking actions
Stop the shot, the throw and the swing on the client – and why that is feedback, not enforcement.
Shooting from inside
Whoever hits something from the quiet zone loses the protection until they leave.
Limits and pitfalls
The short list: what the zone cannot do, and what looked fine until a dedicated server ran it.
The shape of it
Two kinds of entity are placed in the world: one master per zone, which carries the settings, and any number of corner points. Nothing else has to be set up – no component on the game mode, no manager, no entry in a config. Every zone keeps itself running and replicates its own alarm.
The server decides what is true: it builds the outline, runs the alarm scan and discards damage. The clients receive the outline and the alarm state and use them to block the player's own actions and to show messages.
Rules that held up
| Rule | Why |
|---|---|
| Place and faction decide, not place alone | A zone that protects everybody inside is a free pass for exactly the side it is meant to keep out. See Place and faction. |
| Enforce on the server, give feedback on the client | The damage check runs where damage is computed. The action lock runs where the input is, and is treated as feedback. See Blocking actions. |
| One writer per fact | The server builds the outline and decides the alarm; every client only receives them. Clients that built their own outline each got a different one. See Alarm and replication. |
| Never allow an invulnerable firing position | Whatever cannot be stopped is paid for instead. See Shooting from inside. |
| Hook the class that is really used | One damage manager class overrides the hook without calling its base. A change to the base class never reaches it. See Invulnerability. |
| Prefix every class | A name clash does not break one mod, it breaks the whole script module – for every player. |