Safe Protected Domes / Bases -- How to control elevation of dome?

justchil

Well-Known Member
Hey guys. I'm using something like this: http://dayz.st/w/Protected_Dome

I have instant death setup because people like to exploit the domes we have... is there any way at all the control the elevation... so if someone flies 200m or so above it they wont die?

If I put it to 3 seconds people will exploit in some way. These domes are 50m / 50m so not that big at all yet people want to complain when they keep trying to get in them and die lol
 
player set pos 111,111,5000 rather than player set damage 1

but to change the height, change the middle number in ur mission.sqm so it looks like 123,40,5434 X,Z,Y 40 (z) is ur height
 
I have changed the middle number to 25,50,75,100,200 and tested. Dome still activated at 800m+.

position[]={1503.3221,50,15217.713};
a=50;
b=50;
rectangular=1;
 
What you want is the trigger to activate at or between a specific altitude correct?

There are a few ways of doing this, the best I have found is to set a trigger that activates warning players that are flying into the trigger 50m or higher that they are in restricted airspace, I simply warn the players and they can choose to move on or not. I then have another trigger that activates at 1.5m above terrain that will move the player to a jail location and then relase them at 3m above terrain giving them a good chance of breaking a leg.

In order to acomplish this you want a few conditions to be true for the trigger to activate.

In the Condition field of the trigger use this,
Code:
(vehicle player) in thislist && (getPosATL (vehicle player) select 2) > 50;

then have the activation call to your script or whatever, this will only activate the trigger if the player is in the trigger and higher than 50m. * this is where I call my warning message. The airspace trigger is also 350 x 350m so people know when they are near something they shouldn't be.

I then have a smaller trigger outlining the admin base and in that Condition field I put,

Code:
(vehicle player) in thislist && (getPosATL (vehicle player) select 2) < 1.5;

This way people that attempt to land will think they can, when they get below 1.5m they are warned and then detained, their helo usually just falls the 1.5m surviving from that height.

You can play with the heights you need in the condition feild for the height you want them activated.

Let me know if this confused you or if you need more info, I can provide my detained and messages scripts if you want.
 
get the direction of the player and add 180 to it maybes, so it always spins em around, I use set pos, but that wud probably work better
 
I have a similar setup and the code I was trying to get to is what you posted I believe. I'm not an VB expert by any means... I know what I'm trying to do ... just not getting it done lol

I have a castle setup with a 50x50 kill zone which goes right to the walls perfectly... so all I wanting to do is make the altitude say 50m up instead of however far it goes. So if someone flies over at 51m or above they are fine... if they get 50 or below they die. Right now I can fly over at 800m and die.

I have a warning zone as well... I believe it's 150-200m now around the base. People will do anything they can to get in when the players are away so I've have a "BLACK OUT" then instant death.


I'm basically using the script provided on dayz.st wiki and have slightly modified it. I'm all for examples even if it's something I don't need lol. Let me re-read your post a few times and see if I can apply it how I think it works to my test server. :D
 
justchill, I see that dayz.st gives you instructions on how to add the triggers by editing the mission.sqm directly. This is by far the worst way of adding anything to the mission file. First because if you make a typo and can't find it you are screwed. Second it is complicated and stupid. The best way is to load the mission into the arma 2d editor and add your triggers that way. Anyway, google loading your mission into the 2d editor, it will make it a wholelot easier.

If you want to add the trigger by manipulating the mission.sqm directly, you can use my trigger for reference, this is what I use for my community base to keep bandits out. I will also attach the associated antibandit.sqf so you can poke at that and learn a bit.

Here is the trigger. * code pulled directly from the mission.sqm
Code:
        class Item9
        {
            position[]={6479.8315,287.15808,7413.3867};
            a=55;
            b=55;
            angle=-85.482002;
            rectangular=1;
            activationBy="ANY";
            repeating=1;
            interruptable=1;
            age="UNKNOWN";
            name="trading_post_1";
            expCond="(vehicle player) in thislist && (getPosATL (vehicle player) select 2) < 1.5;";
            expActiv="antibandit = [] execVM ""admin\antibandit.sqf"";";
            expDesactiv="terminate antibandit;";
            class Effects
            {
            };
        };

* you must change the < 1.5 to > 50, this will activate the trigger above 50m when the player enters the area.

Here is the antibandit.sqf code.
Code:
Private ["_humanity","_playerName","_uid"];
_playerName = name player;
_uid = getPlayerUID player;
_humanity = player getVariable["humanity",0];
 
//Check If Bandit
diag_log "started antibandit";
if (_humanity <= 0) then {
    hint parseText format ["
    <t size='1.25' font='Bitstream' align='center' color='#18A9D9'>%2</t><br/>
    <t size='1.5' font='Bitstream' align='center' color='#EB1111'>.ACCESS DENIED.</t><br/><br/>
    <t size='1.35' font='Bitstream' align='center' color='#F8BC06'>You are a Bandit.</t><br/>
    <t size='1.15' font='Bitstream' align='left'>You will be detained.</t><br/>
    <t size='1.15' font='Bitstream' align='left' color='#F8BC06'>You might get hurt!</t><br/>
    <t size='1.15' font='Bitstream' align='left' color='#DF0101'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%1</t><br/><br/>",
    (player getVariable['humanity', 0]),
    (name player),
    (getPlayerUID player)
    ];
sleep 8;
hint ""; 
  (player setPosATL [3999.3284,7858.9536,0.001]);    //Jail Location 1 - Format: [X,Y,Z] (Z = Height AtTerrainLevel)
diag_log(format["BANDIT PLAYER: %1 DETAINED: Trading Post. HUMANITY: %2 UID: %3", _playerName, _humanity, _uid]);
 
} else {
 
if (playerSide == WEST) then {
[trading_post] execVM "admin\safezone.sqf";
 
hintSilent parseText format ["
    <t size='1.20' font='Bitstream' color='#5882FA'>%1</t><br/><br/>
    <t size='1.20' font='Bitstream' color='#5882FA'>Trader Post Rules!!</t><br/><br/>
    <t size='1.15' font='Bitstream' align='center'>Bandits are Not Welcome</t><br/><br/>
    <t size='1.15' font='Bitstream' align='center'>No Shooting other Players</t><br/><br/>
    <t size='1.15' font='Bitstream' align='center'>This is not a Camp Site</t><br/><br/>
    <t size='1.15' font='Bitstream' align='center'>No Pitching of Tents</t><br/><br/>
    <t size='1.15' font='Bitstream' align='center'>You can Only Trade</t><br/><br/>
    <t size='1.15' font='Bitstream' align='center' color='#DF0101'>Be Friendly </t><br/>",
    (name player)
];
};
};
diag_log "ended antibandit";

On another note, you will notice the antibandit moves the player to [3999.3284,7858.9536,0.001], this moves the player to my jail and that activates another trigger that I call detained. I like to detain players so they don't get pissed for dying, but bandits will break their legs. LoL

Here is the detained.sqf that is activated when the player is placed at the above coordinates.

Code:
// DayZ Prison Detain/Release
// Created by Wiked Bubble
// Wiked Bubble, LevelGamers.net
Private ["_playerName","_humanity","_uid"];
 
_playerName = name player;
_humanity = player getVariable["humanity",0];
_uid = getPlayerUID player;
 
// If LG Council
if (_uid in masterUIDArray) then {
    player setPosATL [3941.15,7859.58,2.3];
diag_log(format["RELEASED ADMIN BANDIT: %1 from Prison. HUMANITY: %2 UID: %3", _playerName, _humanity, _uid]);
 
    } else {
    disableUserInput true;
       
//Check If Bandit and not LG Council
//Release and Drop from 3.2m
if ((not (_uid in masterUIDArray)) and (_humanity <= 0)) then {
   
    hint parseText format ["
    <t size='.95' font='Bitstream' align='Center' color='#F10B0B'>--------------------------------</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>You are in Prison...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>For trespassing...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>You Must Wait...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>about a minute...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>Bandits are not Welcome..</t><br/><br/>
    <t size='1' font='Bitstream' align='left' color='#DF0101'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%1</t><br/>",
    (player getVariable['humanity', 0])
    ];   
    sleep 45;
    disableUserInput false;
    player setPosATL [6539.1,6084.17,3.2];
diag_log(format["RELEASED BANDIT: %1 from Prison. HUMANITY: %2 UID: %3", _playerName, _humanity, _uid]);   
    terminate detained;
   
} else {
 
//If not LG Council just move
if (not (_uid in masterUIDArray))then {
 
    hint parseText format ["
    <t size='.95' font='Bitstream' align='Center' color='#F10B0B'>--------------------------------</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>You are in Prison.</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>For trespassing...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>You Must Wait...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>about a minute...</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>It could be worse.</t><br/>
    <t size='1' font='Bitstream' align='left' color='#4EDCFF'>If you're a Bandit.</t><br/><br/>
    <t size='1' font='Bitstream' align='left' color='#DF0101'>Humanity: </t><t size='1.15' font='Bitstream' align='right'>%1</t><br/>",
    (player getVariable['humanity', 0])
    ];   
    sleep 45;
    disableUserInput false;
    player setPosATL [6539.1,6084.17,0.001];
diag_log(format["RELEASED PLAYER: %1 HUMANITY: %2 UID: %3", _playerName, _humanity, _uid]);
    terminate detained;
};
};
};

You will notice that user input is disabled while being detained.
 
Oh man thanks so much. This will be so useful. I had to change gears and work on some other things due to BE being down but I should have time this evening to go over this :D
 
What exactly is angle used for? I used 3d editor for buildings and such so I should be able to figure it out. Lots to keep me busy here :)
 
When using the 2d editor when you create a trigger it is set at 0 degrees, the angle is what adjusts it's rotation depending how you want it positioned. This obviously has not effect if your trigger is a circle, but if it's an oval or rectangle you can have a more precise placement.
 
Haven't forgot about this.. just been busy with 100 different things. I added your expCond and that solved my issue for the time being. Hope to expand upon what I have very soon!
 
Back
Top