Jump to content
  • 0

Custom Zones/ Chernarus/ Epoch 1.0.6


sentinel618

Question

Hey guys,

I feel that this should be simple, is probably made clear somewhere, and that i'm just very stupid but I cannot seem to create custom zones on my Epoch 1.0.6 Chernarus server.

I have tried as others have suggested and taken the code from mission.sqm which relates to entering and leaving trader cities and the like, increased the 'class item' from 6 to 7 then tried adding my own coords and description as below:

 

		class Item6
		{
			position[]={066127,150,2572}; 
			TRGDEF
			name="zonecherno";
			expCond="(player distance zonecherno) < 250;";
			expActiv="[""Chernogorsk"",false,""enter""] call player_traderCity;";
			expDesactiv="[""Chernogorsk"",false,""leave""] call player_traderCity;";
		};

I assume the problem lies with the 'position' numbers. I tried to decipher what they were from other locations and replicate but no joy...

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 1
4 hours ago, sentinel618 said:

Hey guys,

I feel that this should be simple, is probably made clear somewhere, and that i'm just very stupid but I cannot seem to create custom zones on my Epoch 1.0.6 Chernarus server.

I have tried as others have suggested and taken the code from mission.sqm which relates to entering and leaving trader cities and the like, increased the 'class item' from 6 to 7 then tried adding my own coords and description as below:

 


		class Item6
		{
			position[]={066127,150,2572}; 
			TRGDEF
			name="zonecherno";
			expCond="(player distance zonecherno) < 250;";
			expActiv="[""Chernogorsk"",false,""enter""] call player_traderCity;";
			expDesactiv="[""Chernogorsk"",false,""leave""] call player_traderCity;";
		};

I assume the problem lies with the 'position' numbers. I tried to decipher what they were from other locations and replicate but no joy...

It looks like you've done GPS coordinates there, here's what you need to do coordinate wise:

		class Item6
		{
			position[]={6656.21,0,2620.96}; 
			TRGDEF
			name="zonecherno";
			expCond="(player distance zonecherno) < 250;";
			expActiv="[""Chernogorsk"",false,""enter""] call player_traderCity;";
			expDesactiv="[""Chernogorsk"",false,""leave""] call player_traderCity;";
		};

 

Link to comment
Share on other sites

  • 0
23 minutes ago, salival said:

It looks like you've done GPS coordinates there, here's what you need to do coordinate wise:


		class Item6
		{
			position[]={6656.21,0,2620.96}; 
			TRGDEF
			name="zonecherno";
			expCond="(player distance zonecherno) < 250;";
			expActiv="[""Chernogorsk"",false,""enter""] call player_traderCity;";
			expDesactiv="[""Chernogorsk"",false,""leave""] call player_traderCity;";
		};

 

Yes, I took coords from the infistar admin debug and tried to format them the same way as other entries.

May I ask how you converted them?

Link to comment
Share on other sites

  • 0
1 minute ago, sentinel618 said:

Yes, I took coords from the infistar admin debug and tried to format them the same way as other entries.

May I ask how you converted them?

Since you're using infistar:

Push F2, scroll down and click on "Copy Worldspace(coords) to RPT & Chat" it will open up the chat menu and it will put the direction and coordinates (worldspace) into it. Select it with your mouse and hit ctrl - c, it will return something like this:

[225.714,[6648.49,2617.11,0.00143862]]

We are only interested in the second part of that array, the first is direction.

So for what you need for that:

6648.49,0,2617.11

As @ebaydayzmentioned, { x, z, y} (Z can be 0 since it's not used)

Link to comment
Share on other sites

  • 0
5 minutes ago, salival said:

Since you're using infistar:

Push F2, scroll down and click on "Copy Worldspace(coords) to RPT & Chat" it will open up the chat menu and it will put the direction and coordinates (worldspace) into it. Select it with your mouse and hit ctrl - c, it will return something like this:


[225.714,[6648.49,2617.11,0.00143862]]

We are only interested in the second part of that array, the first is direction.

So for what you need for that:


6648.49,0,2617.11

As @ebaydayzmentioned, { x, z, y} (Z can be 0 since it's not used)

I'm sorry to be a pain... That seems to be working in so much as it recognises the area inside Cherno as being a trader city and does not allow you to log out within the area. It does not however inform you that you're entering or leaving the area.

Is there a tutorial online anywhere which I can work through?  Failing that is there some code I can replicate and adjust so that custom areas are identified as specific zones but which does not enforce safezone rules?

Link to comment
Share on other sites

  • 0
19 minutes ago, sentinel618 said:

I'm sorry to be a pain... That seems to be working in so much as it recognises the area inside Cherno as being a trader city and does not allow you to log out within the area. It does not however inform you that you're entering or leaving the area.

Is there a tutorial online anywhere which I can work through?  Failing that is there some code I can replicate and adjust so that custom areas are identified as specific zones but which does not enforce safezone rules?

That should definitely be working, especially if you are in it and in a trader zone, also remember the coordinates I gave you may not have been exactly what you were after position wise

expCond="(player distance zonecherno) < 250;";

You did set this a very large radius, though, remember that's 500 meters diameter, so you may need to go some distance out before it kicks the leaving/entering message.

This code you are modifying wont invoke safe zone rules, that code is DZE_safeZonePosArray so you are fine to carry on as you are

 

*EDIT*

Change these lines to the following:

			expActiv="[""Chernogorsk"",true,""enter""] call player_traderCity;";
			expDesactiv="[""Chernogorsk"",true,""leave""] call player_traderCity;";

Which will make it display entering/exiting the trade zone.

Link to comment
Share on other sites

  • 0
7 minutes ago, salival said:

That should definitely be working, especially if you are in it and in a trader zone, also remember the coordinates I gave you may not have been exactly what you were after position wise


expCond="(player distance zonecherno) < 250;";

You did set this a very large radius, though, remember that's 500 meters diameter, so you may need to go some distance out before it kicks the leaving/entering message.

This code you are modifying wont invoke safe zone rules, that code is DZE_safeZonePosArray so you are fine to carry on as you are

 

*EDIT*

Change these lines to the following:


			expActiv="[""Chernogorsk"",true,""enter""] call player_traderCity;";
			expDesactiv="[""Chernogorsk"",true,""leave""] call player_traderCity;";

Which will make it display entering/exiting the trade zone.

That makes perfect sense and code-naivety aside I should have noticed that.

I want a fairly large radius so the 250 is potentially even too small still.

Definitely getting a 'Cannot abort while in a trader area' message though so that's still something I need to look at.

Thank you for all your help thus far :)

Link to comment
Share on other sites

  • 0
1 minute ago, sentinel618 said:

That makes perfect sense and code-naivety aside I should have noticed that.

I want a fairly large radius so the 250 is potentially even too small still.

Definitely getting a 'Cannot abort while in a trader area' message though so that's still something I need to look at.

Thank you for all your help thus far :)

Just checking you saw my updated edit to enable the message of entering/leaving?

Link to comment
Share on other sites

  • 0

I revive this one.

I am trying to make a couple of cities pvp area.   I had instructions and I finally set the marker in the map with the notice about entering in a pvp area (the rest of Chernarus is totall pve and no damage from players to players).... I was reading something about "radiation zones"... I dont want to have radiation but pvp... how can that be done and set? my mission.sqm file is: 

Spoiler

    class Sensors
    {
        items=7;
#define TRGDEF a=100;b=100;activationBy="WEST";repeating=1;interruptable=1;age="UNKNOWN";class Effects{};
        class Item0
        {
            position[]={6325,304,7807};
            TRGDEF
            name="zonestary";
            expCond="(player distance zonestary) < 100;";
            expActiv="[""trader city Stary"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Stary"",true,""leave""] call player_traderCity;";
        };
        class Item1
        {
            position[]={4063,365,11664};
            TRGDEF
            name="zonebash";
            expCond="(player distance zonebash) < 100;";
            expActiv="[""trader city Bash"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Bash"",true,""leave""] call player_traderCity;";
        };
        class Item2
        {
            position[]={11447,317,11364};
            TRGDEF
            name="zoneklen";
            expCond="(player distance zoneklen) < 100;";
            expActiv="[""trader city Klen"",true,""enter""] call player_traderCity;";
            expDesactiv="[""trader city Klen"",true,""leave""] call player_traderCity;";
        };
        class Item3
        {
            position[]={1606,289,7803};
            TRGDEF
            name="zonebandit";
            expCond="(player distance zonebandit) < 100;";
            expActiv="[""Bandit Trader"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Bandit Trader"",false,""leave""] call player_traderCity;";
        };
        class Item4
        {
            position[]={12944,210,12766};
            TRGDEF
            name="zonehero";
            expCond="(player distance zonehero) < 100;";
            expActiv="[""Hero Trader"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Hero Trader"",false,""leave""] call player_traderCity;";
        };
        class Item5
        {
            position[]={12060,158,12638}; 
            TRGDEF
            name="zoneaircraft";
            expCond="(player distance zoneaircraft) < 100;";
            expActiv="[""Aircraft Trader"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Aircraft Trader"",false,""leave""] call player_traderCity;";
        };
        class Item6
        {
        position[]={6656.21,0,2620.96}; 
            /*TRGDEF
            name="zonecherno";
            expCond="(player distance zonecherno) < 350;";
            expActiv="[""Chernogorsk"",false,""enter""] call player_traderCity;";
            expDesactiv="[""Chernogorsk"",false,""leave""] call player_traderCity;";

                    position[]={6901,0,2509};*/
                    TRGDEF
                    name="zonepvp";
                    expCond="(player distance zonepvp) < 200;";
                    expActiv="systemChat (format [""You are entering PVP zone.""]);";
                    expDesactiv="systemChat (format [""You are leaving PVP zone.""]);";
        };
    };

Well... just the sensor part.   Should I have another file to set the damage on?

thanks!

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...