← Home SEEBIE90 DOCS
The GTG Safe Zone mod is published under the Arma Public License (APL)Example code is free to useSuggestions: Discord to the author

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.

In plain wordsTechniques from a safe zone mod: a protected area of any shape made from placed corner points, an alarm ring around it, and protection that depends on place and faction. Each page is one problem and how to solve it.

View in the Workshop →

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.

NoteA safe zone that is only a sphere with the damage set to zero works until the base is not round – and then players inside can still shoot out while they cannot be hurt. Both halves of that sentence are what these pages are about: the shape of the zone, and what the zone must not allow.

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.

Points: placed corners→Zone: outline, ring, alarm→Server guard: discard damage→Client guard: block actions

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

RuleWhy
Place and faction decide, not place aloneA 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 clientThe 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 factThe 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 positionWhatever cannot be stopped is paid for instead. See Shooting from inside.
Hook the class that is really usedOne damage manager class overrides the hook without calling its base. A change to the base class never reaches it. See Invulnerability.
Prefix every classA name clash does not break one mod, it breaks the whole script module – for every player.
Example code on this page is free to use in your own projects (credit appreciated). The GTG Safe Zone mod is published under the Arma Public License (APL). Suggestions: Discord. Arma Reforger / Enfusion are trademarks of Bohemia Interactive.
Impressum · Privacy Policy