SadBoy1981

Radiation zones

7 posts in this topic

I add some Radiation zones on my Altis server. Is there way to add fog or something esle to make visible zones where they are?

Only markers on map are not so realistic.

Share this post


Link to post
Share on other sites
Advertisement
On 29/3/2016 at 0:53 PM, SadBoy1981 said:

I add some Radiation zones on my Altis server. Is there way to add fog or something esle to make visible zones where they are?

Only markers on map are not so realistic.

if you want can use class sensors ;) 

Share this post


Link to post
Share on other sites

I thought I read somewhere that class sensors was or is being removed? Anyhow, I know this works.

This is just a rework of the code Second Coming shared with you for safe zones a while back, so credit goes to him. I just took out the safe zone calls, it's now just a sensor that gives a warning when entering or exiting a defined area. 

Spoiler

sensor.sqf


if (!hasInterface || isServer) exitWith {};
 
private ["_worldName", "_warningZones", "_sleep","_warningZoneRadius"];
 
_worldName = toLower format ["%1", worldName];
 
switch (_worldName) do
{
        case "altis":{
                _radiation1 = [14599,16797,0];
                _radiation2 = [23334,24188,0];
                _radiation3 = [2998,18175,0];
                _radiation4 = [23442,17737,0];
                _radiation5 = [9263,12631,0];
                _warningZones = [_radiation1,_radiation2,_radiation3,_radiation4,_radiation5];
        };
        case "chernarus":{
                _radiation1 = [6325,7807,0];
                _radiation2 = [11666,3205,0];
                _radiation3 = [4073,11677,0];
                _radiation4 = [11462,11348,0];
                _radiation5 = [12013,12653,0];
                _warningZones = [_radiation1,_radiation2,_radiation3,_radiation4,_radiation5];
        };
        case "namalsk":{
                _radiation1 = [9049.76,8404.27,0];
                _radiation2 = [11666,3205,0];
                _radiation3 = [4073,11677,0];
                _radiation4 = [11462,11348,0];
                _radiation5 = [12013,12653,0];
                _warningZones = [_radiation1,_radiation2,_radiation3,_radiation4,_radiation5];
        };
};
 
 
_warningZoneRadius         = 250;          // how far in metres you want the warning to appear
_sleep                  = 5;            // time in seconds between checking if you're in the radius
       
while {true} do
{
        {
                _distanceToWarningZone = player distance2D _x;
 
                if (_distanceToWarningZone <= _warningZoneRadius) then
                {
						["whoops", ["You are about to enter a contaminated area!"]] call ExileClient_gui_notification_event_addNotification;  	//Enter message
                        waitUntil { player distance2D _x > _warningZoneRadius; };
                        ["whoops", ["Now leaving contaminated area!"]] call ExileClient_gui_notification_event_addNotification;            		//Exit message
						
                };
               
        } forEach _warningZones;
        sleep _sleep;
};

Change coords to match your radiation zones in the altis section.

place in mission folder & call it inside your init.sqf

execVM "sensor.sqf";

 

2 people like this

Share this post


Link to post
Share on other sites

i use this:

    class Sensors
    {
        items=1;
        class Item0
        {
            position[]={25409.8,0,20338.7};
            a=300;
            b=300;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="RadiationZone1";
            expCond="this && (local player) && (vehicle player in thisList)";
            expActiv="hint ""PERICOLO!!! Stai Entrando in una Zona Radioattiva! Usa La Maschera Per Proteggerti Dalle Radiationi!"";";
            expDesactiv="hint ""Hai Abbandonato la Zona Radioattiva. Adesso Ti Poi Rilassare."";";
            class Effects
            {
            };
        };
    };

    class Markers
    {
        items=2;
        class Item0
        {
            position[]={25409.8,0,20338.7};                   
            name="RadiationZone1";
            text="";
            markerType="ELLIPSE";
            type="Empty";
            colorName="ColorRed";
            fillName="Grid";
            a=300;
            b=300;
            drawBorder=1;
        };
        class Item1
        {
            position[]={25409.8,0,20338.7};
            name="ResearchFacility1";
            text="Zona Radioattiva1";
            type="mil_dot";
            colorName="ColorBlack";
        };
    };
};

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.