Death cross script ??

Code:
_trg=createTrigger["EmptyDetector",getPos player];
_trg setTriggerArea']setTriggerArea[5,5,0,false];
_trg setTriggerActivation["CIV","PRESENT",true];
_trg setTriggerStatements']setTriggerStatements["this", "hint 'Civilian near player'", "hint 'no civilian near'"];

this stupid code :(

can´t spawn this trigger for my deathmessage ;(

anything idee?
 
Works but player respawns where he died here is my sqf

Code:
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills"];
if (deathHandled) exitWith {};
 
deathHandled = true;
// ################## grave cross parameter start ##################
    _magazines    = call player_countmagazines;
    _backpack  = unitBackpack player;
 
    // ------------------items backpack check
    private ["_newBackpackType","_backpackWpn","_backpackMag"];
        dayz_myBackpack = unitBackpack player;
    _newBackpackType = (typeOf dayz_myBackpack);
        if(_newBackpackType != "") then {
            _backpackWpn = getWeaponCargo unitBackpack player;
            _backpackMag = getMagazineCargo unitBackpack player;
        };
// ################## grave cross parameter stop ##################
//Death
 
_body =        player;
_playerID =    getPlayerUID player;
 
//Send Death Notice
//["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName]] call callRpcProcedure;
        dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName];
        publicVariable "dayzDeath";
 
_id = [player,20,true,getPosATL player] spawn player_alertZombies;
 
sleep 0.5;
 
player setDamage 1;
0.1 fadeSound 0;
 
player setVariable ["NORRN_unconscious", false, true];
player setVariable ["unconsciousTime", 0, true];
player setVariable ["USEC_isCardiac",false,true];
player setVariable ["medForceUpdate",true,true];
//remove combat timer on death
player setVariable ["startcombattimer", 0, true];
r_player_unconscious = false;
r_player_cardiac = false;
 
_id = player spawn spawn_flies;
 
_humanity =        0;
_wait =        0;
 
_array = _this;
if (count _array > 0) then {
    _source = _array select 0;
    _method = _array select 1;
    if (!isNull _source) then {
        if (_source != player) then {
            _canHitFree =    player getVariable ["freeTarget",false];
            _isBandit = (["Bandit",typeOf player,false] call fnc_inString);
            _myKills =        ((player getVariable ["humanKills",0]) / 30) * 1000;
            if (!_canHitFree and !_isBandit) then {
                //Process Morality Hit
                _humanity = -(2000 - _myKills);
                _kills =        _source getVariable ["humanKills",0];
                _source setVariable ["humanKills",(_kills + 1),true];
                _wait = 300;
            } else {
                //Process Morality Hit
                //_humanity = _myKills * 100;
                _killsV =        _source getVariable ["banditKills",0];
                _source setVariable ["banditKills",(_killsV + 1),true];
                _wait = 0;
            };
            if (_humanity < 0) then {
                _wait = 0;
            };
            if (!_canHitFree and !_isBandit) then {
                //["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
                dayzHumanity = [_source,_humanity,_wait];
                publicVariable "dayzHumanity";
            };
        };
    };
    _body setVariable ["deathType",_method,true];
};
 
terminate dayz_musicH;
terminate dayz_lootCheck;
terminate dayz_slowCheck;
terminate dayz_animalCheck;
terminate dayz_monitor1;
terminate dayz_medicalH;
terminate dayz_gui;
terminate dayz_zedCheck;
terminate dayz_locationCheck;
terminate dayz_combatCheck;
terminate dayz_spawnCheck;
 
//Reset (just in case)
//deleteVehicle dayz_playerTrigger;
disableUserInput false;
r_player_dead = true;
 
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [4]; "dynamicBlur" ppEffectCommit 0.2;
 
"colorCorrections" ppEffectEnable true;
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.01],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 1;
 
//Player is Dead!
3 fadeSound 0;
0 cutText ["", "BLACK",10];
dayz_DeathActioned = true;
sleep 1;
 
TitleText[localize "str_player_12","PLAIN DOWN",5];
 
dayz_originalPlayer enableSimulation true;
 
addSwitchableUnit dayz_originalPlayer;
setPlayable dayz_originalPlayer;
selectPlayer dayz_originalPlayer;
 
_myGroup = group _body;
[_body] joinSilent dayz_firstGroup;
deleteGroup _myGroup;
// ################## grave cross script start ##################
   
// --------------------player items setparameter
_playerWeapons = weapons _body;
_playerMagazines = _magazines;
   
// ############# script ##############
   
removeAllWeapons _body;
clearMagazineCargo _body;
hidebody _body;
   
// --------------------Create the tombstone objects.
_graveBase = createVehicle ["GraveCross2", position _body, [], 0, "NO_COLLIDE"];
_graveBase setPosATL position _body; // setPos again because arma.
_graveBase setDir _playerDir;
   
// --------------------Create a loot container inside the grave.
_tempContainer = createVehicle ["weaponHolder", getPosATL _graveBase, [], 1, "can_collide"];
_containerLoc = getPosATL _tempContainer;
_containerLoc = [((_containerLoc select 0) + 0),((_containerLoc select 1) + 0),0];
_tempContainer setPosATL _containerLoc;
   
// #### PLAYER items to weaponholder start ####
   
// player add weapons
{
_tempContainer addWeaponCargoGlobal [_x,1];
} forEach _playerWeapons;
 
// player add items
{
_tempContainer addMagazineCargoGlobal [_x,1];
} forEach _playerMagazines;
   
// #### PLAYER items to weaponholder stop ####
// #### BACKPACK items to weaponsholder start ####
   
if (!isNil "_newBackpackType") then {
if (_newBackpackType != "") then {
_backpackWpnTypes = [];
_backpackWpnQtys = [];
        if (count _backpackWpn > 0) then {
        _backpackWpnTypes = _backpackWpn select 0;
        _backpackWpnQtys =    _backpackWpn select 1;
        };
_countr = 0;
        {
        _tempContainer addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
_countr = _countr + 1;
        } forEach _backpackWpnTypes;
        _backpackmagTypes = [];
        _backpackmagQtys = [];
        if (count _backpackmag > 0) then {
        _backpackmagTypes = _backpackMag select 0;
        _backpackmagQtys =    _backpackMag select 1;
        };
_countr = 0;
        {
        _tempContainer addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
_countr = _countr + 1;
        } forEach _backpackmagTypes;
    };
};
   
// #### BACKPACK items to weaponsholder stop ####
 
 
// ### vanilla dayz ###
_class = typeOf _backpack;
if (_class == "CZ_VestPouch_EP1") then {createVehicle ["CZ_VestPouch_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Patrol_Pack_EP1") then {createVehicle ["DZ_Patrol_Pack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Assault_Pack_EP1") then {createVehicle ["DZ_Assault_Pack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_CivilBackpack_EP1") then {createVehicle ["DZ_CivilBackpack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_ALICE_Pack_EP1") then {createVehicle ["DZ_ALICE_Pack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Backpack_EP1") then {createVehicle ["DZ_Backpack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_British_ACU") then {createVehicle ["DZ_British_ACU", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Czech_Vest_Puch") then {createVehicle ["DZ_Czech_Vest_Puch", position _body, [], 3, "can_collide"];};
 
 
// ### epoch ###
_class = typeOf _backpack;
if (_class == "DZ_GunBag_EP1") then {createVehicle ["DZ_GunBag_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_TerminalPack_EP1") then {createVehicle ["DZ_TerminalPack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_TK_Assault_Pack_EP1") then {createVehicle ["DZ_TK_Assault_Pack_EP1", position _body, [], 3, "can_collide"];};
// #### BACKPACK to weaponsholder stop ####
[_graveBase, _tempContainer, _backp] spawn {
};
 
hideBody _body;
// ################## grave cross script stop ##################
 
3 cutRsc ["default", "PLAIN",3];
4 cutRsc ["default", "PLAIN",3];
 
if (count _array > 0) then {
    _body setVariable ["deathType",_method,true];
};
 
_body setVariable["combattimeout", 0, true];
 
//["dayzFlies",player] call broadcastRpcCallAll;
sleep 2;
 
1 cutRsc ["DeathScreen","BLACK OUT",3];
 
 
playMusic "dayz_track_death_1";
 
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;
 
Works but player respawns where he died here is my sqf

Code:
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills"];
if (deathHandled) exitWith {};
 
deathHandled = true;
// ################## grave cross parameter start ##################
    _magazines    = call player_countmagazines;
    _backpack  = unitBackpack player;
 
    // ------------------items backpack check
    private ["_newBackpackType","_backpackWpn","_backpackMag"];
        dayz_myBackpack = unitBackpack player;
    _newBackpackType = (typeOf dayz_myBackpack);
        if(_newBackpackType != "") then {
            _backpackWpn = getWeaponCargo unitBackpack player;
            _backpackMag = getMagazineCargo unitBackpack player;
        };
// ################## grave cross parameter stop ##################
//Death
 
_body =        player;
_playerID =    getPlayerUID player;
 
//Send Death Notice
//["dayzDeath",[dayz_characterID,0,_body,_playerID,dayz_playerName]] call callRpcProcedure;
        dayzDeath = [dayz_characterID,0,_body,_playerID,dayz_playerName];
        publicVariable "dayzDeath";
 
_id = [player,20,true,getPosATL player] spawn player_alertZombies;
 
sleep 0.5;
 
player setDamage 1;
0.1 fadeSound 0;
 
player setVariable ["NORRN_unconscious", false, true];
player setVariable ["unconsciousTime", 0, true];
player setVariable ["USEC_isCardiac",false,true];
player setVariable ["medForceUpdate",true,true];
//remove combat timer on death
player setVariable ["startcombattimer", 0, true];
r_player_unconscious = false;
r_player_cardiac = false;
 
_id = player spawn spawn_flies;
 
_humanity =        0;
_wait =        0;
 
_array = _this;
if (count _array > 0) then {
    _source = _array select 0;
    _method = _array select 1;
    if (!isNull _source) then {
        if (_source != player) then {
            _canHitFree =    player getVariable ["freeTarget",false];
            _isBandit = (["Bandit",typeOf player,false] call fnc_inString);
            _myKills =        ((player getVariable ["humanKills",0]) / 30) * 1000;
            if (!_canHitFree and !_isBandit) then {
                //Process Morality Hit
                _humanity = -(2000 - _myKills);
                _kills =        _source getVariable ["humanKills",0];
                _source setVariable ["humanKills",(_kills + 1),true];
                _wait = 300;
            } else {
                //Process Morality Hit
                //_humanity = _myKills * 100;
                _killsV =        _source getVariable ["banditKills",0];
                _source setVariable ["banditKills",(_killsV + 1),true];
                _wait = 0;
            };
            if (_humanity < 0) then {
                _wait = 0;
            };
            if (!_canHitFree and !_isBandit) then {
                //["dayzHumanity",[_source,_humanity,_wait]] call broadcastRpcCallAll;
                dayzHumanity = [_source,_humanity,_wait];
                publicVariable "dayzHumanity";
            };
        };
    };
    _body setVariable ["deathType",_method,true];
};
 
terminate dayz_musicH;
terminate dayz_lootCheck;
terminate dayz_slowCheck;
terminate dayz_animalCheck;
terminate dayz_monitor1;
terminate dayz_medicalH;
terminate dayz_gui;
terminate dayz_zedCheck;
terminate dayz_locationCheck;
terminate dayz_combatCheck;
terminate dayz_spawnCheck;
 
//Reset (just in case)
//deleteVehicle dayz_playerTrigger;
disableUserInput false;
r_player_dead = true;
 
"dynamicBlur" ppEffectEnable true;"dynamicBlur" ppEffectAdjust [4]; "dynamicBlur" ppEffectCommit 0.2;
 
"colorCorrections" ppEffectEnable true;
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 0.01],  [1, 1, 1, 0.0]];
"colorCorrections" ppEffectCommit 1;
 
//Player is Dead!
3 fadeSound 0;
0 cutText ["", "BLACK",10];
dayz_DeathActioned = true;
sleep 1;
 
TitleText[localize "str_player_12","PLAIN DOWN",5];
 
dayz_originalPlayer enableSimulation true;
 
addSwitchableUnit dayz_originalPlayer;
setPlayable dayz_originalPlayer;
selectPlayer dayz_originalPlayer;
 
_myGroup = group _body;
[_body] joinSilent dayz_firstGroup;
deleteGroup _myGroup;
// ################## grave cross script start ##################
 
// --------------------player items setparameter
_playerWeapons = weapons _body;
_playerMagazines = _magazines;
 
// ############# script ##############
 
removeAllWeapons _body;
clearMagazineCargo _body;
hidebody _body;
 
// --------------------Create the tombstone objects.
_graveBase = createVehicle ["GraveCross2", position _body, [], 0, "NO_COLLIDE"];
_graveBase setPosATL position _body; // setPos again because arma.
_graveBase setDir _playerDir;
 
// --------------------Create a loot container inside the grave.
_tempContainer = createVehicle ["weaponHolder", getPosATL _graveBase, [], 1, "can_collide"];
_containerLoc = getPosATL _tempContainer;
_containerLoc = [((_containerLoc select 0) + 0),((_containerLoc select 1) + 0),0];
_tempContainer setPosATL _containerLoc;
 
// #### PLAYER items to weaponholder start ####
 
// player add weapons
{
_tempContainer addWeaponCargoGlobal [_x,1];
} forEach _playerWeapons;
 
// player add items
{
_tempContainer addMagazineCargoGlobal [_x,1];
} forEach _playerMagazines;
 
// #### PLAYER items to weaponholder stop ####
// #### BACKPACK items to weaponsholder start ####
 
if (!isNil "_newBackpackType") then {
if (_newBackpackType != "") then {
_backpackWpnTypes = [];
_backpackWpnQtys = [];
        if (count _backpackWpn > 0) then {
        _backpackWpnTypes = _backpackWpn select 0;
        _backpackWpnQtys =    _backpackWpn select 1;
        };
_countr = 0;
        {
        _tempContainer addWeaponCargoGlobal [_x,(_backpackWpnQtys select _countr)];
_countr = _countr + 1;
        } forEach _backpackWpnTypes;
        _backpackmagTypes = [];
        _backpackmagQtys = [];
        if (count _backpackmag > 0) then {
        _backpackmagTypes = _backpackMag select 0;
        _backpackmagQtys =    _backpackMag select 1;
        };
_countr = 0;
        {
        _tempContainer addmagazineCargoGlobal [_x,(_backpackmagQtys select _countr)];
_countr = _countr + 1;
        } forEach _backpackmagTypes;
    };
};
 
// #### BACKPACK items to weaponsholder stop ####
 
 
// ### vanilla dayz ###
_class = typeOf _backpack;
if (_class == "CZ_VestPouch_EP1") then {createVehicle ["CZ_VestPouch_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Patrol_Pack_EP1") then {createVehicle ["DZ_Patrol_Pack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Assault_Pack_EP1") then {createVehicle ["DZ_Assault_Pack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_CivilBackpack_EP1") then {createVehicle ["DZ_CivilBackpack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_ALICE_Pack_EP1") then {createVehicle ["DZ_ALICE_Pack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Backpack_EP1") then {createVehicle ["DZ_Backpack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_British_ACU") then {createVehicle ["DZ_British_ACU", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_Czech_Vest_Puch") then {createVehicle ["DZ_Czech_Vest_Puch", position _body, [], 3, "can_collide"];};
 
 
// ### epoch ###
_class = typeOf _backpack;
if (_class == "DZ_GunBag_EP1") then {createVehicle ["DZ_GunBag_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_TerminalPack_EP1") then {createVehicle ["DZ_TerminalPack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_TK_Assault_Pack_EP1") then {createVehicle ["DZ_TK_Assault_Pack_EP1", position _body, [], 3, "can_collide"];};
// #### BACKPACK to weaponsholder stop ####
[_graveBase, _tempContainer, _backp] spawn {
};
 
hideBody _body;
// ################## grave cross script stop ##################
 
3 cutRsc ["default", "PLAIN",3];
4 cutRsc ["default", "PLAIN",3];
 
if (count _array > 0) then {
    _body setVariable ["deathType",_method,true];
};
 
_body setVariable["combattimeout", 0, true];
 
//["dayzFlies",player] call broadcastRpcCallAll;
sleep 2;
 
1 cutRsc ["DeathScreen","BLACK OUT",3];
 
 
playMusic "dayz_track_death_1";
 
"dynamicBlur" ppEffectAdjust [0]; "dynamicBlur" ppEffectCommit 5;
"colorCorrections" ppEffectAdjust [1, 1, 0, [1, 1, 1, 0.0], [1, 1, 1, 1],  [1, 1, 1, 1]];"colorCorrections" ppEffectCommit 5;


you shot the player and the message in chat whas "friendly fire"?
this its normal in "dayz" epoch what ever.



EDIT:

here its the fail:
[_graveBase, _tempContainer, _backp] spawn {

to

[_graveBase, _tempContainer] spawn {

its fixed?
 
IN the chat XXXX was killed he resapawned with all his gear.

pls change:

// #### BACKPACK to weaponsholder stop ####
[_graveBase, _tempContainer, _backp] spawn {
};

to

// #### BACKPACK to weaponsholder stop ####
[_graveBase, _tempContainer] spawn {
};

and test again pls :)
fixed?
 
Didnt work

change next step her: line 1
private["_array","_source","_kills","_killsV","_humanity","_wait","_myKills"];

to

private ["_array","_source","_kills","_killsV","_humanity","_wait","_myKills","_infected","_canHitFree","_myHumanity","_method","_body","_playerID","_id","_myGroup","_magazineArray","_control","_item","_val","_max"];

that fixed the problem!!! :)

EDIT: why understand your line its too small ... standard its in the file not this whas in your file o_O
 
Code:
_trg=createTrigger["EmptyDetector",getPos player];
_trg setTriggerArea']setTriggerArea[5,5,0,false];
_trg setTriggerActivation["CIV","PRESENT",true];
_trg setTriggerStatements']setTriggerStatements["this", "hint 'Civilian near player'", "hint 'no civilian near'"];

this stupid code :(

can´t spawn this trigger for my deathmessage ;(

anything idee?


Code:
_bombTrigger = createTrigger["EmptyDetector",[0,0,0]];
_bombTrigger setTriggerArea [5,5,0,false];
_bombTrigger setTriggerActivation ["ANY","PRESENT",true];
_bombTrigger setTriggerStatements ["{(isPlayer _x)} count thisList > 0;","0 = [thisTrigger,thislist] execVM 'Scripts\DetonateBodyBomb.sqf'",""];

This is the trigger I use for my bomb. It means that if any players entire the trigger area the script DetonateBodyBomb is executed. Try using this as a basis for whatever you are doing :)
 
Code:
_bombTrigger = createTrigger["EmptyDetector",[0,0,0]];
_bombTrigger setTriggerArea [5,5,0,false];
_bombTrigger setTriggerActivation ["ANY","PRESENT",true];
_bombTrigger setTriggerStatements ["{(isPlayer _x)} count thisList > 0;","0 = [thisTrigger,thislist] execVM 'Scripts\DetonateBodyBomb.sqf'",""];

This is the trigger I use for my bomb. It means that if any players entire the trigger area the script DetonateBodyBomb is executed. Try using this as a basis for whatever you are doing :)


thx :) my new windows root and the servers must setting ;)
next time make the update from my script

Feindflug
 
thx :) my new windows root and the servers must setting ;)
next time make the update from my script

Feindflug
Code:
_trg setTriggerActivation["CIV","PRESENT",true];
That's where your trigger was breaking...well one part of it. DayZ doesn't have CIV's so no CIV's could be present to activate it :p
 
Code:
_trg setTriggerActivation["CIV","PRESENT",true];
That's where your trigger was breaking...well one part of it. DayZ doesn't have CIV's so no CIV's could be present to activate it :p

no this whas a exemple from biohemia ... my setting whas any ;)
 
Didnt work

add the backpack here:

Code:
// ### epoch ###
_class = typeOf _backpack;
if (_class == "DZ_GunBag_EP1") then {createVehicle ["DZ_GunBag_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_TerminalPack_EP1") then {createVehicle ["DZ_TerminalPack_EP1", position _body, [], 3, "can_collide"];};
_class = typeOf _backpack;
if (_class == "DZ_TK_Assault_Pack_EP1") then {createVehicle ["DZ_TK_Assault_Pack_EP1", position _body, [], 3, "can_collide"];};

add this under this line:

Code:
if (_class == "DZ_TK_Assault_Pack_EP1") then {createVehicle ["DZ_TK_Assault_Pack_EP1", position _body, [], 3, "can_collide"];};

Code:
// other
_class = typeOf _backpack;
if (_class == "CLASSNAME") then {createVehicle ["CLASSNAME", position _body, [], 3, "can_collide"];};

copy the name from mysql database in script "CLASSNAME" and add this under the line from backpack.
 
i work in last time to hard ^^
next update come in the next time ... :)

in next update come: deathmessage (I hope I get it)

see you later
Feindflug
 
Back
Top