How do you add multiple protective domes?

luke smith

New Member
Hey guys, so basically i have started using the protective dome script on my server on donator bases, and parts of the map i don't want people to have access to, i got the script from here - http://dayz.st/w/Protected_Dome however it only seems to let me add one. I will try and add the second dome but it just won't work. This is what the code looks like for the one dome (that works) -

class Sensors
{
items=1;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};

Then this is what the code looks like when i try and add both domes in -
class Sensors
{
items=2;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
class Item1
{
position[]={41.675,0.008,1688.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome2";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome2.sqf"";";
expDesactiv="terminate dome2; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};

I don't know what i am doing wrong, also sometimes i get stuck on the wait for host screen when i try adding the second dome.


Help will be very much appreciated thanks :)
 
Hey guys, so basically i have started using the protective dome script on my server on donator bases, and parts of the map i don't want people to have access to, i got the script from here - http://dayz.st/w/Protected_Dome however it only seems to let me add one. I will try and add the second dome but it just won't work. This is what the code looks like for the one dome (that works) -

class Sensors
{
items=1;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};

Then this is what the code looks like when i try and add both domes in -
class Sensors
{
items=2;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
class Item1
{
position[]={41.675,0.008,1688.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome2";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome2.sqf"";";
expDesactiv="terminate dome2; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};

I don't know what i am doing wrong, also sometimes i get stuck on the wait for host screen when i try adding the second dome.


Help will be very much appreciated thanks :)

Use the class underneath it as a model (for adding more than one in) Right off the bat, you don't need another "Class Sensors", and you also need it to call on a SECOND dome file (which I see that you already have, goodjob)
 
Use the class underneath it as a model (for adding more than one in) Right off the bat, you don't need another "Class Sensors", and you also need it to call on a SECOND dome file (which I see that you already have, goodjob)

Hey, thanks for replying. I have already tried that though, and it either gets stuck on wait for host/ the dome just won't work :(, any other suggestions?
 
Hey, thanks for replying. I have already tried that though, and it either gets stuck on wait for host/ the dome just won't work :(, any other suggestions?

Then you have it written wrong, you have to have multiple items etc, i'll try to throw together an example when I have time but for now just keep trying mate! You might get lucky :p
 
Code:
class Sensors
{
items=2;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
class Item1
{
position[]={41.675,0.008,1688.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome2";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome2.sqf"";";
expDesactiv="terminate dome2; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};
the class effects from your first sensor item has an open {. That needs to be closed with a }; like the second one.
 
Code:
class Sensors
{
items=2;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
class Item1
{
position[]={41.675,0.008,1688.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome2";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome2.sqf"";";
expDesactiv="terminate dome2; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};
the class effects from your first sensor item has an open {. That needs to be closed with a }; like the second one.



Thanks man, i will try that out in a bit, and let you know how it goes. :)
 
Code:
class Sensors
{
items=2;
class Item0
{
position[]={48.675,0.001,1588.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome.sqf"";";
expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
class Item1
{
position[]={41.675,0.008,1688.4};
a=130;
b=97;
rectangular=1
activationBy="WEST";
repeating=1;
interruptable=1;
age="UNKNOWN";
name="dome2";
expCond="(vehicle player) in thislist;";
expActiv="dome = [] execVM ""dome2.sqf"";";
expDesactiv="terminate dome2; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
class Effects
{
};
};
};
the class effects from your first sensor item has an open {. That needs to be closed with a }; like the second one.


Hey man, i still can't get it to work i have tried it for like 2 hours now, i just get stuck on wait for host. Could you please do an example? I am kinda new to scripting i don't really understand much of it. Thanks
 
Hi. I have the protective dome on my server protecting my
Admin base and its fantastic. I see your script above allows for more than one dome which is where my problem is.
I've not had time to try it yet but I see it does not allow for different people to have different bases.
What I mean is, I have someone who has paid for a private base but I don't know how to give him access to his base without adding him to mine. You see, your dome script where you allow certain people into the base is separate to where you add how many domes you want. Is there a way of setting his uid without adding it to where my uid goes for my base?
I hope I've explained it clearly lol.
Many thanks
Termy

Edit: the players uid goes in the dome.sqf file. So if all uid's go here surely everyone can enter all the domes. Whereas the actual number of domes is edited in the mission.sqf. Therefore can it be made so that person A can not gain access to person B's dome.
 
Hi. I have the protective dome on my server protecting my
Admin base and its fantastic. I see your script above allows for more than one dome which is where my problem is.
I've not had time to try it yet but I see it does not allow for different people to have different bases.
What I mean is, I have someone who has paid for a private base but I don't know how to give him access to his base without adding him to mine. You see, your dome script where you allow certain people into the base is separate to where you add how many domes you want. Is there a way of setting his uid without adding it to where my uid goes for my base?
I hope I've explained it clearly lol.
Many thanks
Termy

Make a second safezone.sqf that is the exact same as yours, include his UID in that second one, and when you add your sensors for it have it point to this second safezone.sqf (the one with his UID in it)
 
Holy cow dude. Fastest reply ever lol.
When you say safe zone , you mean the same as the dome.sqf but call it safe zone.sqf?
Ok to be honest I'm not a scriptor. Would you be kind enough if you have time to edit me a template I could copy and paste. I know it's cheeky of me but I also learn this way lol. Currently on my way to work so I won't get a chance to try it until this evening. But I would be eternally grateful if you could. Many thanks
Termy.
 
Holy cow dude. Fastest reply ever lol.
Ok to be honest I'm not a scriptor. Would you be kind enough if you have time to edit me a template I could copy and paste. I know it's cheeky of me but I also learn this way lol. Currently on my way to work so I won't get a chance to try it until this evening. But I would be eternally grateful if you could. Many thanks
Termy.

Unfortunately I can't, busy spreading the love around the forums and modifying / writing quick scripts for people to use. However, it's relatively simple to do. You literally just copy your safezone.sqf and name it safezone2.sqf then make another sensor underneath the one that you have existing already (examples can be found above, in this very thread) and have it point to safezone2.sqf, it's cake :D
 
Ok. I think I can get my head around that. You are a true gent for your fast replies. Once again , many thanks. I will try this tonight when I get home.
 
Here is from my mission.sqm
Code:
class Sensors
    {
        items=2;
        class Item0
        {
            position[]={14169.452,131.35104,14395.472};
            a=95;
            b=65;
            rectangular=1;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="SPBASE1";
            expCond="(vehicle player) in thislist;";
            expActiv="SPBASE1 = [] execVM ""Scripts\SPBASE1.sqf"";";
            expDesactiv="SPBASE1 = [] execVM ""Scripts\SPBASE1LEAVE.sqf"";";
            class Effects
            {
            };
        };
        class Item1
        {
            position[]={12755.016,9.6222105,14098.715};
            a=20;
            b=20;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="SHBASE1";
            expCond="(vehicle player) in thislist;";
            expActiv="SHBASE1 = [] execVM ""Scripts\SHBASE1.sqf"";";
            expDesactiv="SHBASE1 = [] execVM ""Scripts\SHBASE1LEAVE.sqf"";";
            class Effects
            {
            };
        };
Firstly where it says
items=2;
that needs to be the total number of sensors you have, the first one would be class Item0 so if you go all the way down that list and the last one says classItem 99 then your total would be 100.

Secondly, what Matt L was talking about is this part
SPBASE1.sqf
that is the name of the .sqf that contains the safezone code. Here's mine so you can see what I mean.
Code:
// Base Protection
if ((getPlayerUID player) in ["123456789","987654321"]) then {
titleText ["Welcome back.", "PLAIN DOWN", 3];
fnc_usec_damageHandler = {};
fnc_usec_unconscious  = {};
player_zombieCheck = {};
player allowDamage false;
} else {
titleText ["You are entering a restricted zone, you have 10 seconds to leave or else face death.", "PLAIN DOWN", 3];
sleep 5;
titleText ["Last warning, 5 seconds.", "PLAIN DOWN", 3];
sleep 5;
titleText ["You were warned!", "PLAIN DOWN", 3];
player setDamage 1;
};

I hope that helps clear it up, let us know if you need any more help.
 
guys ur both legends. Ive not tried it yet lol but i am about to do so and ill post back how i got on.
Many thanks.

EDIT:

Genious's. Thankyou so much, it has worked a treat.
 
Would it also be possible to see your "exit" sqf as in how you applied these:

Code:
 player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
player allowDamage true;

Thanks in advance
 
Would it also be possible to see your "exit" sqf as in how you applied these:

Code:
 player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
player allowDamage true;

Thanks in advance

Last post for tonight. Then bed.
Code:
Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"];
_Basis = _this select 0; //Basisname
while {true} do
  {
    waitUntil {vehicle player in list _Basis};
titleText ["Welcome to the Trading post, God mode ON.", "PLAIN DOWN", 3];
sleep 2;
player setUnitRecoilCoefficient 0;
player_zombieCheck = {};
fnc_usec_damageHandler = {};
fnc_usec_unconscious  = {};
player allowDamage false;
    waitUntil {! (vehicle player in list _Basis)};
titleText ["Leaving Trading Post, God mode OFF.", "PLAIN DOWN", 3];
sleep 2;
player setUnitRecoilCoefficient 1;
player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
player allowDamage true;
  }
 
Hi,

I've tried to add some safezones but didn't succeeded... I tried several solutions without any success ! I don't see the enter/quit message and I'm not in God Mod.

This is my class Sensors :
Code:
    class Sensors
    {
        items=16;
        class Item0
        {
            position[]={12936.7,0,12779.8};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone1";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone1 = [] execVM ""safezone1.sqf"";";
            class Effects
            {
            };
        };
        class Item1
        {
            position[]={9626.4,0,13500.4};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone2";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone2 = [] execVM ""safezone2.sqf"";";
            class Effects
            {
            };
        };
        class Item2
        {
            position[]={8973.1,0,10006.7};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone3";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone3 = [] execVM ""safezone3.sqf"";";
            class Effects
            {
            };
        };
        class Item3
        {
            position[]={4088.89,0,11654.4};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone4";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone4 = [] execVM ""safezone4.sqf"";";
            class Effects
            {
            };
        };       
        class Item4
        {
            position[]={4109.91,0,3354.83};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone5";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone5 = [] execVM ""safezone5.sqf"";";
            class Effects
            {
            };
        };           
        class Item5
        {
            position[]={1893.12,0,11148.1};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone6";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone6 = [] execVM ""safezone6.sqf"";";
            class Effects
            {
            };
        };               
        class Item6
        {
            position[]={13150.4,0,10814.6};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone7";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone7 = [] execVM ""safezone7.sqf"";";
            class Effects
            {
            };
        };           
        class Item7
        {
            position[]={6960.19,0,4908.53};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone8";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone8 = [] execVM ""safezone8.sqf"";";
            class Effects
            {
            };
        };           
        class Item8
        {
            position[]={11510.8,0,4943.12};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone9";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone9 = [] execVM ""safezone9.sqf"";";
            class Effects
            {
            };
        };           
        class Item9
        {
            position[]={9327.6,0,4272.73};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone10";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone10 = [] execVM ""safezone10.sqf"";";
            class Effects
            {
            };
        };           
        class Item10
        {
            position[]={8306.69,0,2446.5};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone11";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone11 = [] execVM ""safezone11.sqf"";";
            class Effects
            {
            };
        };           
        class Item11
        {
            position[]={9614.49,0,8120.07};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone12";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone12 = [] execVM ""safezone12.sqf"";";
            class Effects
            {
            };
        };           
        class Item12
        {
            position[]={5940.19,0,11198};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone13";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone13 = [] execVM ""safezone13.sqf"";";
            class Effects
            {
            };
        };       
        class Item13
        {
            position[]={6517.42,0,4160.03};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone14";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone14 = [] execVM ""safezone14.sqf"";";
            class Effects
            {
            };
        };           
        class Item14
        {
            position[]={7636.88,0,3990.19};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone15";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone15 = [] execVM ""safezone15.sqf"";";
            class Effects
            {
            };
        };       
        class Item15
        {
            position[]={7370.54,0,9215.07};
            a=50;
            b=50;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="safezone16";
            expCond="(vehicle player) in thislist;";
            expActiv="safezone16 = [] execVM ""safezone16.sqf"";";
            class Effects
            {
            };
        };           
    };
And here is my safezoneX.sqf (always the same) :
Code:
Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"];
_Basis = _this select 0; //Basisname
while {true} do
  {
    waitUntil {vehicle player in list _Basis};
titleText ["Vous entrez dans un camp safe, God Mode ON.", "PLAIN DOWN", 3];
sleep 2;
player setUnitRecoilCoefficient 0;
player_zombieCheck = {};
fnc_usec_damageHandler = {};
fnc_usec_unconscious  = {};
player allowDamage false;
    waitUntil {! (vehicle player in list _Basis)};
titleText ["Vous quittez le camp safe, God mode OFF.", "PLAIN DOWN", 3];
sleep 2;
player setUnitRecoilCoefficient 1;
player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf";
fnc_usec_damageHandler = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_damageHandler.sqf";
fnc_usec_unconscious = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_unconscious.sqf";
player allowDamage true;
  }

What am I doing wrong ?

Thanks in advance for your help ;)
 
Back
Top