Jump to content
  • 0

Protected Dome Sensor Help


R4id3n84

Question

So I'm using the Protected Dome script and its working fine however the hight of the dome is infinite not what i set it to in the sensor

 

Here is my Mission.sqm sensors

	class Sensors
	{
		items=6;
		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="[""trader city Stary"",true,""enter""] spawn player_traderCity;";
			expDesactiv="[""trader city Stary"",true,""leave""] spawn player_traderCity;";
			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="[""trader city Bash"",true,""enter""] spawn player_traderCity;";
			expDesactiv="[""trader city Bash"",true,""leave""] spawn player_traderCity;";
			class Effects
			{
			};
		};
		class Item2
		{
			position[]={11447.472,317.26886,11364.504};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zoneklen";
			expCond="(player distance zoneklen) < 100;";
			expActiv="[""trader city Klen"",true,""enter""] spawn player_traderCity;";
			expDesactiv="[""trader city Klen"",true,""leave""] spawn player_traderCity;";
			class Effects
			{
			};
		};
		class Item3
		{
			position[]={1606.6443,289.70795,7803.5156};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonebandit";
			expCond="(player distance zonebandit) < 100;";
			expActiv="[""Bandit Trader"",false,""enter""] spawn player_traderCity;";
			expDesactiv="[""Bandit Trader"",false,""leave""] spawn player_traderCity;";
			class Effects
			{
			};
		};
		class Item4
		{
			position[]={12944.227,210.19823,12766.889};
			a=100;
			b=100;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="zonehero";
			expCond="(player distance zonehero) < 100;";
			expActiv="[""Hero Trader"",false,""enter""] spawn player_traderCity;";
			expDesactiv="[""Hero Trader"",false,""leave""] spawn player_traderCity;";
			class Effects
			{
			};
		};
		class Item5
		{
			position[]={9981.0683594,0.001,2622.638672};
			a=60;
			b=120;
			activationBy="WEST";
			repeating=1;
			interruptable=1;
			age="UNKNOWN";
			name="Dome";
			expCond="(vehicle player) in thislist;";
			expActiv="Dome = [] execVM ""custom\domes\OwnersDome.sqf"";";
			expDesactiv="terminate dome; titleText [""You've left the dome"", ""PLAIN DOWN"", 3];";
			class Effects
			{
			};
		};
	};
};

Here is my Dome

// Below, put the UID of player(s) where it says pasteUIDhere that you want to give access to the dome
if ((getPlayerUID player) in ["123","123"]) exitWith { 
titleText [format ["Welcome, %1", name player], "PLAIN DOWN"]; // Or titleText ["Welcome home", "PLAIN DOWN", 3];
};
// What happens if unauthorized players get into the dome
titleText ["You Are Entering A Restricted Area, Leave.", "PLAIN DOWN", 3];
sleep 5;
titleText ["Are You Blind? GET OUT", "PLAIN DOWN", 3];
sleep 5;
titleText ["Still Not Listening, Huh?", "PLAIN DOWN", 3];
sleep 5;
titleText ["You Have 5 Seconds Left", "PLAIN DOWN", 3];
sleep 5;
titleText ["Good Night.", "PLAIN DOWN", 3];
sleep 2;
player setDamage 1;

I want the with width to be 60 Meters same as my Plot Pole and the Height to be 120 Meters same as my Plot Pole

 

Any help would be appreciated

 

Many Thanks

 

R4id3n84

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

DZE_PlotPole = [60,120];

&nbsp;

Ist the 1st number width and 2nd height ?

absolutely not. 1st number is the Radius in which you can build with a plot pole.

Second Number is a radius outside of which you cannot place another plot pole

Link to comment
Share on other sites

  • 0

Ah ok my bad lol

 

So can i not add Height to the dome ? dnt matter if i can't

 

Also can i get the dome to call UID's from a list rather than adding the dome owner + admins can i get it to call from 2 lists like

AdminList = [
"123",
"456",
"789"
];

DomeList = [
"123",
"456",
"789"
];

?

 

Thanks in advance

 

R4id3n84

Link to comment
Share on other sites

  • 0

you can try change this:

expCond="(vehicle player) in thislist;";

to this:

expCond="(player distance Dome) < 120;";

you wont be able to set both width and hight, but you can set this to 120 and it should only activate when a player is within 120m.

 

else you can try this:

expCond="((vehicle player) in thislist) && ((getPosATL player) select 2 < 120);"; 

but im unsure if it will accept that.

Link to comment
Share on other sites

  • 0

you can try change this:

expCond="(vehicle player) in thislist;";

to this:

expCond="(player distance Dome) < 120;";

you wont be able to set both width and hight, but you can set this to 120 and it should only activate when a player is within 120m.

 

else you can try this:

expCond="((vehicle player) in thislist) && ((getPosATL player) select 2 < 120);"; 

but im unsure if it will accept that.

 

 

Umm, that's partly correct. I'm thinking about: getPosATL is getting the position relative to the Terrain, but i think Markers and triggers are actually relative to the sea level. Might make a difference, might not.

Also, "select 2" is a action that needs to be executed (not the best explanation), but anyway it should look more like so:

 

expCond="((vehicle player) in thislist) && (((getPosATL player) select 2) < 120);";

Umm yeah, like i said, it might make a difference what function you use to get the position, you can also use the absolute position, which would look like so:

expCond="((vehicle player) in thislist) && (((getPos player) select 2) < 120);";
Link to comment
Share on other sites

  • 0

 

Umm, that's partly correct. I'm thinking about: getPosATL is getting the position relative to the Terrain, but i think Markers and triggers are actually relative to the sea level. Might make a difference, might not.

 

it wont matter what the trigger (or marker for that matter) height in the position is when i check altitude of the player, doh.

 

 

Also, "select 2" is a action that needs to be executed (not the best explanation), but anyway it should look more like so:

expCond="((vehicle player) in thislist) && (((getPosATL player) select 2) < 120);";

 

incorrect, you can fetch a single element out of the position array, without a problem:

//show current height
systemchat format["My height: %1",(getposatl (vehicle player)) select 2];
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...