Announcement

Collapse
No announcement yet.

Zone Restriction Script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [GUIDE] Zone Restriction Script

    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.

    To place in the "Init.sqf":
    nul = [BIS_Zora_0] execVM "zoraSigns.sqf";
    "zoraSigns.sqf"
    // Script by kylania;
    _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;

    TGU Instructor TG Pathfinder

    Former TGU Dean Former ARMA Admin Former Irregulars Officer

    "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

  • #2
    Re: Zone Restriction Script

    thats pretty sweet actually.
    sigpic


    Dont be shy, add me on Steam by clicking the icon below.



    Comment


    • #3
      Re: Zone Restriction Script

      Wow, really useful. After looking through MSO, I noticed Zora is used quite a bit... however I never really knew why until now.

      I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones. -Albert Einstein

      Comment


      • #4
        Re: Zone Restriction Script

        Zora in mso is used to stop enemy being spawned in certain areas marked on the map
        The path of my life is strewn with cowpats from the devil's own satanic herd.

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X