Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// ################## 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 ##################
_playerMagazines = _magazines;
The current version is still
http://pastebin.com/tvYaBzgZ
Unless the above fix didn't work.
To copy, hit RAW next to Download on the page.
As long as you didn't mess up any of the default lines, it needs to look like this:
http://pastebin.com/xBsJDzM5
If anyone wants anything else added to the script, let me know.
class CfgSounds
{
sounds[] = {};
class spooky1
{
name = "soo_spooky";
sound[] = {"fx\spooky.ogg", 1, 1};
titles[] = {1, "Someone must have died nearby..."};
};
};
_graveBase setDir _playerDir;
// Lets add Sounds!
_trig = createTrigger ["EmptyDetector", getPos _tempContainer];
_trig setTriggerArea [5,5,0,false]
_trig setTriggerActivation ["NONE", "present", true];
_trig setTriggerStatements ["player distance < 30", "player say "spooky1"" , ""];
_graveBase setDir _playerDir;
// Lets add Sounds!
_trig = createTrigger ["EmptyDetector", getPos _tempContainer];
_trig setTriggerArea [5,5,0,false]
_trig setTriggerActivation ["NONE", "present", true];
_trig setTriggerStatements ["player distance < 30", "player say "spooky1"" , ""];
Maybe
instead ofCode:_playerMagazines = magazines _body;
Code:_playerMagazines = getMagazineCargo _body;
under
addCode:_graveBase setDir _playerDir;
Code:// Lets add Sounds! _trig = createTrigger ["EmptyDetector", getPos _tempContainer]; _trig setTriggerArea [5,5,0,false] _trig setTriggerActivation ["NONE", "present", true]; _trig setTriggerStatements ["player distance < 30", "player say "spooky1"" , ""];
Unless I have the trigger code wrong it should work.
Soon as I add this part of code, then try it out.
You die as normal with grave cross, but you get stuck on debug plains screen.
_trg=createTrigger["EmptyDetector",getPos _tempContainer];
_trg setTriggerArea[10,10,0,false];
_trg setTriggerActivation["ANY","PRESENT",true];
_trg setTriggerStatements ["this", "player say 'spooky1'", ""];
Bush,
still not working![]()
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
// Study Graves
if ((cursorTarget == "GraveCross2") && _canDo) then {
if (s_player_studygrave < 0) then {
s_player_studygrave = player addAction ["Study Grave","Custom\studygrave.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_studygrave;
s_player_studygrave = -1;
};
// End Study Graves
if ((_this getVariable) == "permaLoot") then {
switch (floor(random 10)) do {
case 0: {
cutText ["There's a large pool of blood nearby.","PLAIN DOWN"];
};
case 1: {
cutText ["There's shell cases littered around.","PLAIN DOWN"];
};
case 2: {
cutText ["This person was buried very hastily.","PLAIN DOWN"];
};
case 3: {
cutText ["There are dead zombies laying around, must have been their final fight.","PLAIN DOWN"];
};
case 4: {
cutText ["They almost made it off the coast.","PLAIN DOWN"];
};
case 5: {
cutText ["There are dragmarks near the cross.","PLAIN DOWN"];
};
case 6: {
cutText ["Next to the cross sits an empty can of beans.","PLAIN DOWN"];
};
case 7: {
cutText ["They never managed to find their Twinky.","PLAIN DOWN"];
};
case 8: {
cutText ["They must have started in Kamenka.","PLAIN DOWN"];
};
case 9: {
cutText ["They thought they could handle it up North. They were wrong.","PLAIN DOWN"];
};
};
} else {
cutText ["It's a grave in a graveyard...","PLAIN DOWN"];
sleep 3;
cutText ["Lucky they died before this infection.","PLAIN DOWN"];
};
There should be a way to add study body. Theoretically you could add an exception in fn_selfActions to let you have studybody on a cross, but since there is no _body I think it'll just be unknown name with an unknown cause. Instead I tossed together a script to give you a random cause but it'll still be unknown name unless you want me to put in random names too (like Fred, Dave, etc).
Add this to your fn_selfActions under
addCode:_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
Code:// Study Graves if ((cursorTarget == "GraveCross2") && _canDo) then { if (s_player_studygrave < 0) then { s_player_studygrave = player addAction ["Study Grave","Custom\studygrave.sqf",cursorTarget, 0, false, true, "",""]; }; } else { player removeAction s_player_studygrave; s_player_studygrave = -1; }; // End Study Graves
Then put this in a file called studygrave.sqf
Code:if ((_this getVariable) == "permaLoot") then { switch (floor(random 10)) do { case 0: { cutText ["There's a large pool of blood nearby.","PLAIN DOWN"]; }; case 1: { cutText ["There's shell cases littered around.","PLAIN DOWN"]; }; case 2: { cutText ["This person was buried very hastily.","PLAIN DOWN"]; }; case 3: { cutText ["There are dead zombies laying around, must have been their final fight.","PLAIN DOWN"]; }; case 4: { cutText ["They almost made it off the coast.","PLAIN DOWN"]; }; case 5: { cutText ["There are dragmarks near the cross.","PLAIN DOWN"]; }; case 6: { cutText ["Next to the cross sits an empty can of beans.","PLAIN DOWN"]; }; case 7: { cutText ["They never managed to find their Twinky.","PLAIN DOWN"]; }; case 8: { cutText ["They must have started in Kamenka.","PLAIN DOWN"]; }; case 9: { cutText ["They thought they could handle it up North. They were wrong.","PLAIN DOWN"]; }; }; } else { cutText ["It's a grave in a graveyard...","PLAIN DOWN"]; sleep 3; cutText ["Lucky they died before this infection.","PLAIN DOWN"]; };
Feel like adding the 'studyBody' to the gravecross?
I know someone had made it but it never worked for me.... its back one page in this thread at the top
http://opendayz.net/threads/death-cross-script.13004/page-4
Thx in advance, really appreciate all the help so far... its been awesome![]()
_graveBase = createVehicle ["GraveCross2", _containerLoc, [], 0, "NO_COLLIDE"];
_graveBase setPosATL _containerLoc;
_graveBase setDir _playerDir;
_namePlayer = _body getVariable["bodyName","unknown"];
_graveBase setVariable["bodyName", _namePlayer, true];
_graveBase setVariable["deathType", _method, true];
// Study Body
if (_player_studybody) then {
if (s_player_studybody < 0) then {
s_player_studybody = player addAction [localize "str_action_studybody", "\z\addons\dayz_code\actions\study_body.sqf",_cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_studybody;
s_player_studybody = -1;
};
_isgravcross = cursorTarget isKindOf "GraveCross2";
if (_isgravcross) then {
if (s_player_studybody < 0) then {
s_player_studybody = player addAction ["Study Grave", "\z\addons\dayz_code\actions\study_body.sqf",cursorTarget, 0, false, true, "",""];
};
} else {
player removeAction s_player_studybody;
s_player_studybody = -1;
};