Zone Restriction Signposts

R.Flagg on the BIS forums wanted to know how to give players a visual cue that they were leaving a zone restricted area.  The ZORA module is used to limit the area a player can leave by spawning groups to hunt them should they leave a trigger area.  Here’s a method (including a demo mission) of reminding the player they are about to enter a no-go zone.

This script uses code adapted from MH6 to create a ring of No Entry signs around a Zora trigger zone at 15m intervals. Main drawback is that since I suck at math the trigger has to be a circle. Perhaps some math wiz would be able to make this work with other shapes.

Run it from init.sqf as:

nul = [BIS_Zora_0] execVM "zoraSigns.sqf";
_zoraZone = _this select 0;
_zoraPos = getPos _zoraZone;

_sizeZone = triggerArea _zoraZone;
_angle = _sizeZone select 2;
_radius = _sizeZone select 0; // needs to be a circle with equal a and b
_distanceBetweenPosts = 15; // meters
_count = round((2 * 3.14592653589793 * _radius) / _distanceBetweenPosts);
_step = 360/_count;

for "_x" from 0 to _count do
	_a = (_zoraPos select 0)+(sin(_angle)*_radius);
	_b = (_zoraPos select 1)+(cos(_angle)*_radius);

	_pos = [_a,_b,_zoraPos select 2];
	_angle = _angle + _step;

	_post = "Sign_1L_Noentry_EP1" createVehicle _pos;
	_post setPos _pos;
	_relDir = [_post, _zoraZone] call BIS_fnc_DirTo;
	_post setDir _relDir - 180;

_mrkCrossName = format["%1CrossMarker",_zoraZone];
_mrkCross = createMarker[_mrkCrossName,_zoraPos];
_mrkCross setMarkerShape "ELLIPSE";
_mrkCross setMarkerBrush "CROSS";
_mrkCross setMarkerColor "ColorRed";
_mrkCross setMarkerSize [_radius,_radius];
_mrkCross setMarkerAlpha 0.2;

_mrkBorderName = format["%1BorderMarker",_zoraZone];
_mrkBorder = createMarker[_mrkBorderName,_zoraPos];
_mrkBorder setMarkerShape "ELLIPSE";
_mrkBorder setMarkerBrush "BORDER";
_mrkBorder setMarkerColor "ColorRed";
_mrkBorder setMarkerSize [_radius,_radius];
_mrkBorder setMarkerAlpha 1;

  1. #1 by Laertes on September 12, 2010 - 3:17 AM

    Any chance we can get a demo mission? My attempts at following the instructions simply throwing up errors :p

    • #2 by kylania on September 12, 2010 - 4:27 AM

      Oops! Added a demo mission to the first paragraph. It includes the debug mode for the ZORA module so you can see it at work as well.

  2. #3 by GameAdd1cted on September 12, 2010 - 6:11 AM


    Just stumbled across your webpage… amazing!
    Please keep up the good work.


  3. #4 by Laertes on September 12, 2010 - 10:48 AM

    Awesome. It’s nice to find out what this module actually does, after having it in game for the last year and not knowing what the hell to do with it.

  4. #5 by Cytreen on December 29, 2010 - 5:18 PM

    Is there a way to reverse it so that if they cross into the zone they will spawn. cause im working on a mission on takistan map and i dont want players going to the the middle of the map.

Comments are closed.