felixberndt
Member
Ok, i am working on my trading post right now and some new problems have occured...
I'm still using this safezone script on klen
, but unfortunally zombies spawn at this location since the new update...and as expected the players who are in the safezone cannot kill zeds....but the zeds can kill the players 
First i implemented AI with executing DayZ Factions and add_unit_server.sqf to make AI cleaning the area from Zeds, but when AI spawns the Safezone does not work anymore... I think this depends on the new definitions coming up with DayZ factions...
Maybe a zone restriction or Safe zone script-enhancement would fix that problem, but i actually have no idea how to do it.
Is it possible to make a dead zone for the Zeds Faction?
with st like this:
(Player in list Zone); as condition
Player setDamage 1; as action
Which Faction are the Zeds? Can i define a new faction for Zombies?
I also found a script normally used with a hack tool, which makes a Kill-Aura surrounding the player:
Can i also execute it to surround a trigger?
What would be the execution command for that trigger?
I am bothering my head about a solution and would be greatful about any idea!
Regards
I'm still using this safezone script on klen
Code:
//Base protection for Players with Eventhandler
//
//requires Trigger with activation BLUEFOR and OPFOR with name Basis_West and Basis_East
//
// you can't fire out of your own Base
//
//Those who hit or kill Enemy in it's Base, will be killed
//
// Parameters: [name of the side trigger for the Base Area]
//
//Center_West:
//if (playerSide == WEST) then {[Basis_West] execVM "safezone.sqf"};
//
//Center_East:
//if (playerSide == EAST) then {[Basis_East] execVM "safezone.sqf"};
Private ["_Basis","_EH_Fired","_EH_Hit","_EH_Killed"];
_Basis = _this select 0; //Basisname
while {true} do
{
//wait until Player is in base, then start Eventhandler
waitUntil {vehicle player in list _Basis};
player groupchat "i am in Baseshield!";
_EH_Fired = vehicle player addEventHandler ["Fired", { NearestObject [_this select 0,_this select 4] setPos[0,0,0]}];
_EH_Hit = vehicle player addEventHandler ["Hit", {_this select 1 setdammage 1; player setDammage 0; vehicle player setDammage 0}];
_EH_Killed = vehicle player addEventHandler ["Killed",{_this select 1 setdammage 1}];
//wait until Player left base, then delete EventHandler
waitUntil {! (vehicle player in list _Basis)};
player groupchat "i have left Baseshield!";
player removeEventHandler ["Fired", _EH_Fired];
player removeEventHandler ["Hit", _EH_Hit];
player removeEventHandler ["Killed",_EH_Killed];
}
First i implemented AI with executing DayZ Factions and add_unit_server.sqf to make AI cleaning the area from Zeds, but when AI spawns the Safezone does not work anymore... I think this depends on the new definitions coming up with DayZ factions...
Maybe a zone restriction or Safe zone script-enhancement would fix that problem, but i actually have no idea how to do it.
Is it possible to make a dead zone for the Zeds Faction?
with st like this:
(Player in list Zone); as condition
Player setDamage 1; as action
Which Faction are the Zeds? Can i define a new faction for Zombies?
I also found a script normally used with a hack tool, which makes a Kill-Aura surrounding the player:
Code:
if (isNil "zombieshield") then {zombieshield = true;} else {zombieshield = !zombieshield};
if(zombieshield) then {titleText ["Zombie Shield activated!","PLAIN DOWN"]; titleFadeOut 4;};
while {zombieshield} do {
_pos = getPos player;
_zombies = _pos nearEntities ["zZombie_Base",140];
_count = count _zombies;
for "_i" from 0 to (_count -1) do
{
_zombie = _zombies select _i;
_zombie setDamage 1;
RandomHeadshots=round(random 4);
if (!alive _zombie) then {
zombiekills = player getVariable["zombieKills",0];
player setVariable["zombieKills",zombiekills+1,true];
If (RandomHeadshots==1) then {
_headShots = player getVariable["headShots",0];
player setVariable["headShots",_headShots+1,true]
};
};
};
};
titleText ["Zombie Shield deactivated!","PLAIN DOWN"]; titleFadeOut 4;
Can i also execute it to surround a trigger?
What would be the execution command for that trigger?
I am bothering my head about a solution and would be greatful about any idea!
Regards