Jump to content
  • 0

Help turning a trader zone into a protected dome of sorts?


XOIIO

Question

Hey everyone, I want to ad a protected dome/region, basically an admin base, to my server, and using the code for the trader zones seems to be the best bet, it is as follows, and also on like 1301 of mission.sqm.

items=3;

        class Item0

        {

            position[]={6325.6772,304.99033,7807.7412};

            a=100;

            b=100;

            activationBy="WEST";

            repeating=1;

            interruptable=1;

            age="UNKNOWN";

            name="zonestary";

            expCond="(player distance zonestary) < 100;";

            expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false;";

            expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;";

            class Effects

            {

            };

        };

So, to change this I really just need help with two things. The activationby=west, can I change that to include all directions? would it just be activationby="west","east","north","south" ?

 

I also want to know how to add an exception so that I can build and shoot in the area, as well as other people I add, but anyone not authorized can not build/shoot, or possibly even check the gear in text/vehicles. Is that possible? If not could I just add a kill on a delay?

 

If there is other code to do this please tell me, I'm sure it would be already set up.

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0
//Made by Wuest3nFuchs 
// Dome Protection with Alarm
if ((getPlayerUID player) in ["uid"]) then {  //setup ur uid's
        titleText ["Welcome to a Donatorbase", "PLAIN DOWN", 3]; titleFadeOut 4;
}
else{
// Everyone Else
        titleText ["YOU HAVE 30 SEK TO LEAVE [DONATORS ONLY]", "PLAIN DOWN",3]; titleFadeOut 4;
sleep 18;
playsound "siren";
sleep 1;
        titleText ["You're going to enter on the Donator's base, go away!", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 1;
	titleText ["If you do not walk over in 20 seconds ,get infected and weapons gone!", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 10;
playSound "siren";	
sleep 2;
r_player_infected =	true;
sleep 2;
removeAllWeapons player;
sleep 2;
	titleText ["Wake up already far from here.", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 2;
player setPos [1735.78,3040.42,81.2956];  //Porting the intruder
sleep 2;
};

        class Item1
        {
            position[]={6878.3701,394.52051,11436.437};
            a=200;
            b=200;
            activationBy="ANY";
            type="SWITCH";
            repeating=0;
            interruptable=1;
            age="UNKNOWN";
            name="siren";
            expCond="(vehicle player) in thislist;";
            expActiv="siren = [] execVM ""Sounds\siren.sqf"";";
            expDesactiv="terminate siren; titleText [""You left a the Event AI Base."", ""PLAIN DOWN"", 3];"; //ai base message for example
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="Entering Bad Ass Bandits Zone!"; //ai base message for example
            };
        };

siren.zip

Link to comment
Share on other sites

  • 0

Alright so I added in the code but got this error.

 

File mpmissions\DayZ_Epoch_11.Chernarus\mission.sqm, line 1336: /Mission/Sensors.Item0: Member already defined.

 

Here is the snippet of code, the top one I added in, and the bottom is the trader dome and below that is all the other trader stuff.

 

class Sensors
    {

        items=4;
        class Item0
        {
        position[]={10280.9,12043.4,0.002};
        a=130;
        b=90
        activationBy="WEST";
        repeating=1;
        interruptable=1;
        name="dome";
        expCond="(vehicle player) in thislist;";
        expActiv="dome = [] execVM ""dome.sqf"";";
        expDeactiv="terminate dome; titleText [""You've left the restricted area"", ""PLAIN DOWN"", 3];"
        class Effects
        {
        };
        };
        
        class Item0
        {
            position[]={6325.6772,304.99033,7807.7412};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="zonestary";
            expCond="(player distance zonestary) < 100;";
            expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false;";
            expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;";
            class Effects
            {
            };
        };

 

Here's the code from 1336

 

class Item1
        {
            position[]={4063.4226,365.00577,11664.19};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="zonebash";
            expCond="(player distance zonebash) < 100;";
            expActiv="TitleText[""Now entering trader city Bash"",""PLAIN DOWN""]; canbuild = false;";
            expDesactiv="TitleText[""Now leaving trader city Bash"",""PLAIN DOWN""]; canbuild = true;";
            class Effects
            {
            };

 

I guess I need to change the Class Item1 to something else, but won't that change it from being a dome to something else? Well I'll just try Class Item3 or something

Link to comment
Share on other sites

  • 0

You have two "Item0" in your snippet above. Needs to be Item0 -> Item1 -> Item2 etc

 

And make sure your "items=#;" equals the number of sensor items you have.

 

 

Ah I guess they just needed to be in order, thanks. Two problems left now.

 

First it gives me a message "Cannot load mission" before logging in, and now when I go to that area, it gives me the message for entering trader city klen. I have put dome.sqf in the folder with mission.sqm and also in mpmissions/dome/dome.sqf (made a new folder).

 

Is there another line I need to add somewhere else to get it to load dome.sqf or something? The wiki doesn't show anything relating to that.

 

Also what programming language is this anyways?

 

    class Sensors
    {

        items=4;
        
        class Item0
        {
            position[]={6325.6772,304.99033,7807.7412};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="zonestary";
            expCond="(player distance zonestary) < 100;";
            expActiv="TitleText[""Now entering trader city Stary"",""PLAIN DOWN""]; canbuild = false;";
            expDesactiv="TitleText[""Now leaving trader city Stary"",""PLAIN DOWN""]; canbuild = true;";
            class Effects
            {
            };
        };
        class Item1
        {
            position[]={4063.4226,365.00577,11664.19};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="zonebash";
            expCond="(player distance zonebash) < 100;";
            expActiv="TitleText[""Now entering trader city Bash"",""PLAIN DOWN""]; canbuild = false;";
            expDesactiv="TitleText[""Now leaving trader city Bash"",""PLAIN DOWN""]; canbuild = true;";
            class Effects
            {
            };
        };
        class Item2
        {
            position[]={10280.2,0.002,12041.2};
            a=100;
            b=100;
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="zoneklen";
            expCond="(player distance zoneklen) < 100;";
            expActiv="TitleText[""Now entering trader city Klen"",""PLAIN DOWN""]; canbuild = false;";
            expDesactiv="TitleText[""Now leaving trader city Klen"",""PLAIN DOWN""]; canbuild = true;";
            class Effects
            {
            };
        };
        class Item3
        {
            position[]={10280.9,12043.4,0.002};
            a=130;
            b=90
            activationBy="WEST";
            repeating=1;
            interruptable=1;
            name="dome";
            expCond="(vehicle player) in thislist;";
            expActiv="dome = [] execVM ""dome.sqf"";";
            expDeactiv="terminate dome; titleText [""You've left the restricted area"", ""PLAIN DOWN"", 3];"
            class Effects
        {
        };
        };
    };
Link to comment
Share on other sites

  • 0

ok im looking into it right now

 

 

change the last line to this

 

https://www.dropbox.com/s/leqadyy7eulhbts/mission.sqm

 

hmm, same problem still, what the heck?

 

I even tried adding this so that it would have a blank marker.

 

        class Item17
        {
            position[]={10280.9,0.002,12043.4};
            name="dome";
            type="Empty";
        };

 

Why the heck isn't this working?

Link to comment
Share on other sites

  • 0
//Made by Wuest3nFuchs 
// Dome Protection with Alarm
if ((getPlayerUID player) in ["uid"]) then {  //setup ur uid's
        titleText ["Welcome to a Donatorbase", "PLAIN DOWN", 3]; titleFadeOut 4;
}
else{
// Everyone Else
        titleText ["YOU HAVE 30 SEK TO LEAVE [DONATORS ONLY]", "PLAIN DOWN",3]; titleFadeOut 4;
sleep 18;
playsound "siren";
sleep 1;
        titleText ["You're going to enter on the Donator's base, go away!", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 1;
	titleText ["If you do not walk over in 20 seconds ,get infected and weapons gone!", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 10;
playSound "siren";	
sleep 2;
r_player_infected =	true;
sleep 2;
removeAllWeapons player;
sleep 2;
	titleText ["Wake up already far from here.", "PLAIN DOWN", 3]; titleFadeOut 4;
sleep 2;
player setPos [1735.78,3040.42,81.2956];  //Porting the intruder
sleep 2;
};

        class Item1
        {
            position[]={6878.3701,394.52051,11436.437};
            a=200;
            b=200;
            activationBy="ANY";
            type="SWITCH";
            repeating=0;
            interruptable=1;
            age="UNKNOWN";
            name="siren";
            expCond="(vehicle player) in thislist;";
            expActiv="siren = [] execVM ""Sounds\siren.sqf"";";
            expDesactiv="terminate siren; titleText [""You left a the Event AI Base."", ""PLAIN DOWN"", 3];"; //ai base message for example
            class Effects
            {
                titleType="TEXT";
                titleEffect="PLAIN DOWN";
                title="Entering Bad Ass Bandits Zone!"; //ai base message for example
            };
        };

How would I throw this into my server config? Does one need to be a separate mission as well or do they both go in the server.sqm?

Link to comment
Share on other sites

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
  • Discord

×
×
  • Create New...