Jump to content

[DEATH BODY LOST EVENT] 1.6


juandayz

Recommended Posts

UPDATE 13-6-17

Spawn a marker with 350 of radius.

Inside, lost in somewhere thers a corpse with a jewells reward in his inventory. (the body agonize so shoot on him).


1-Open your init.sqf be sure this line is seted as true;
EpochUseEvents = true;

2- in this line add the event:
EpochEvents = [["any","any","any","any",18,"deathcorpse"],["any","any","any","any",0,"crash_spawner"],["any","any","any","any",15,"supply_drop"]];
 

3-create deathcorpse.sqf and drop into: dayz_server.pbo\modules\ ¡ 

Spoiler

private ["_deathcorpse","_pos","_posWGround","_holder","_loot_lists","_loot2","_spawnRadius","_spawnMarker","_position","_positionarray","_mainpos","_markerRadius","_marker","_this","_center_1","_bodygroup","_deathcorpseskin","_randomCases","_despawn_timer",
"_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_spawnChance","_spawnRoll"];

_loot_lists = [

[
["DMR_DZ"],
["20Rnd_762x51_DMR","Skin_TK_INS_Soldier_AR_EP1_DZ","ItemAmethyst","ItemEmerald"]
],

[
["revolver_gold_EP1"],
["6Rnd_45ACP","ItemSapphire","6Rnd_45ACP","ItemKiloHemp"]
],

[
["ItemPickaxe","ItemSledge"],
["ItemBriefcase100oz","ItemMixOil"]
],

[
["Mosin_DZ"],
["5Rnd_762x54_Mosin","ItemRuby","ItemAmethyst"]
]

];

_loot2 = _loot_lists call BIS_fnc_selectRandom;


_spawnRadius = 5000;
_spawnMarker = 'center';
_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
_positionarray = [
[(_position select 0) - 84.5, (_position select 1) - 21,-0.012],
[(_position select 0) - 70, (_position select 1) - 20,-0.012],
[(_position select 0) + 45, (_position select 1) + 25,-0.012],
[(_position select 0) + 96, (_position select 1) - 14,-0.012],
[(_position select 0) + 49, (_position select 1) + 17.5,-0.012],
[(_position select 0) + 38.5, (_position select 1) - 16,-0.012]
];
_mainpos = _positionarray call BIS_fnc_selectRandom;
_markerRadius = 350; // Radius the camp can spawn and used for the marker

if (isNil "EPOCH_EVENT_RUNNING") then {
EPOCH_EVENT_RUNNING = false;
};
 
// Check for another event running
if (EPOCH_EVENT_RUNNING) exitWith {
diag_log("Event already running");
};

EPOCH_EVENT_RUNNING = true;



 

_marker_on_radius = createMarker ["bodycorpse",_position];
_marker_on_radius setMarkerShape "ELLIPSE";
_marker_on_radius setMarkerType "Cricle01";
_marker_on_radius setMarkerColor "ColorOrange";
_marker_on_radius setMarkerAlpha 0.8;
_marker_on_radius setMarkerBrush "Solid";
_marker_on_radius setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];

_marker = createMarker ["DeathLostBody", _position];
_marker setMarkerText "Death Lost Body";
_marker setMarkerType "mil_circle";
_marker setMarkerColor "ColorBlue";
_marker setMarkerBrush "Solid";
_marker setMarkerSize [0.1, 0.1];


_deathcorpse = createVehicle ["Body1", [(_mainpos select 0) + 1, (_mainpos select 1) - 1,-0.1],[], 0, "CAN_COLLIDE"];
_deathcorpse setDir 0;
_deathcorpse setVectorUp surfaceNormal position _deathcorpse;





[nil,nil,rTitleText,"LOOKING FOR RYAN SOLDIER! FIND A REWARD IN HIS BODY","PLAIN",7.5] call RE;    


_despawn_timer = 500;
_missiontimeout = true;
_cleanmission = false;
_playerPresent = false;
_starttime = floor(time);
while {_missiontimeout} do {
    sleep 10;
    _currenttime = floor(time);
    {if((isPlayer _x) && (_x distance _mainpos <= 20)) then {_playerPresent = true};}forEach playableUnits;//check for nearest players
    if (_currenttime - _starttime >= _despawn_timer) then {_cleanmission = true;};
    if ((_playerPresent) || (_cleanmission)) then {_missiontimeout = false;};
};

 
if (_cleanmission) exitWith{
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"RYAN SOLDIER EVENT has been finished", "PLAIN",10] call RE;
};
 

if (_playerPresent) then {
EPOCH_EVENT_RUNNING = false;

_pos = getPos _deathcorpse;
_posWGround = [_pos select 0,_pos select 1,0];
_holder = createVehicle ['Weaponholder',_posWGround,[],0,'NONE'];


{
_holder addWeaponCargoGlobal [_x,1];
} forEach (_loot2 select 0);
{
_holder addMagazineCargoGlobal [_x,1];
} forEach (_loot2 select 1);
_deathcorpse reveal [_holder];

[nil,nil,rTitleText,"Survivors Found the ryan Soldier body", "PLAIN",10] call RE;
deleteMarker _marker_on_radius;
deleteMarker _marker;


waitUntil{{isPlayer _x && _x distance _mainpos > 200  } count playableunits > 0};

deleteVehicle _deathcorpse;
};

 

VIDEO:

Spoiler

 

 

Link to comment
Share on other sites

  • 1 month later...
On 12/3/2017 at 6:29 AM, Cubitron said:

Hi, event is runing buit no marker shows

hey! heres the bunch of code for markers

Spoiler

 _marker_on_radius = createMarker ["bodycorpse",_position];
_marker_on_radius setMarkerShape "ELLIPSE";
_marker_on_radius setMarkerType "Cricle01";
_marker_on_radius setMarkerColor "ColorOrange";
_marker_on_radius setMarkerAlpha 0.8;
_marker_on_radius setMarkerBrush "Solid";
_marker_on_radius setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];

_marker = createMarker ["DeathLostBody", _position];
_marker setMarkerText "Death Lost Body";
_marker setMarkerType "mil_circle";
_marker setMarkerColor "ColorBlue";
_marker setMarkerBrush "Solid";
_marker setMarkerSize [0.1, 0.1]; 

 

you will see a large marker on the radius of the body... if u wanna show exactly wheres the body.. then change this line:

_marker = createMarker ["DeathLostBody", _position];

by this

_marker = createMarker ["DeathLostBody", _mainpos];

 

Link to comment
Share on other sites

  • 2 months later...

Hi,

Death body and marker is there, but nothing in the body inventory. Maybe i do something wrong?

Spoiler

private ["_spawnRadius","_spawnMarker","_position","_positionarray","_mainpos","_markerRadius","_marker","_this","_center_1","_bodygroup","_deathcorpseskin","_randomCases","_despawn_timer",
"_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_spawnChance","_spawnRoll"];

_spawnChance =  0.70; // Percentage chance of event happening
_spawnRadius = 5000;
_spawnMarker = 'center';
_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
_positionarray = [
[(_position select 0) - 84.5, (_position select 1) - 21,-0.012],
[(_position select 0) - 70, (_position select 1) - 20,-0.012],
[(_position select 0) + 45, (_position select 1) + 25,-0.012],
[(_position select 0) + 96, (_position select 1) - 14,-0.012],
[(_position select 0) + 49, (_position select 1) + 17.5,-0.012],
[(_position select 0) + 38.5, (_position select 1) - 16,-0.012]
];
_mainpos = _positionarray call BIS_fnc_selectRandom;
_markerRadius = 350; // Radius the camp can spawn and used for the marker

if (isNil "EPOCH_EVENT_RUNNING") then {
EPOCH_EVENT_RUNNING = false;
};
 
// Check for another event running
if (EPOCH_EVENT_RUNNING) exitWith {
diag_log("Event already running");
};

EPOCH_EVENT_RUNNING = true;

// Random chance of event happening
_spawnRoll = random 1;
if (_spawnRoll > _spawnChance) exitWith {};

 

_marker_on_radius = createMarker ["bodycorpse",_position];
_marker_on_radius setMarkerShape "ELLIPSE";
_marker_on_radius setMarkerType "Cricle01";
_marker_on_radius setMarkerColor "ColorOrange";
_marker_on_radius setMarkerAlpha 0.8;
_marker_on_radius setMarkerBrush "Solid";
_marker_on_radius setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];

_marker = createMarker ["DeathLostBody", _position];
_marker setMarkerText "Death Lost Body";
_marker setMarkerType "mil_circle";
_marker setMarkerColor "ColorBlue";
_marker setMarkerBrush "Solid";
_marker setMarkerSize [0.1, 0.1];


_this = createCenter civilian;
_center_1 = _this;
_bodygroup = createGroup _center_1;
_deathcorpseskin = "INS_Lopotev_DZ";
_deathcorpse = objNull;
_deathcorpse = _bodygroup createUnit [_deathcorpseskin, [(_mainpos select 0) + 2, (_mainpos select 1) + 2], [], 1, "NONE"];
[_deathcorpse] joinSilent _bodygroup;
_deathcorpse playMove "AidlPpneMstpSnonWnonDnon_SleepA_death";
removeAllWeapons _deathcorpse;
removeAllItems _deathcorpse;
_randomCases = round(random(3));
switch (_randomCases) do {    
        case 0 :{
    _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
        };       
        case 1 :{
    _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
        };
        case 2 :{
    _deathcorpse addMagazine "ItemBriefcase100oz";
    _deathcorpse addMagazine "ItemRuby";
    _deathcorpse addMagazine "ItemEmerald";
        };
};

[nil,nil,rTitleText,"THERS A DEATH LOST FIND A REWARD IN HIS BODY","PLAIN",7.5] call RE;    


_despawn_timer = 500;
_missiontimeout = true;
_cleanmission = false;
_playerPresent = false;
_starttime = floor(time);
while {_missiontimeout} do {
    sleep 10;
    _currenttime = floor(time);
    {if((isPlayer _x) && (_x distance _deathcorpse <= 20)) then {_playerPresent = true};}forEach playableUnits;//check for nearest players
    if (_currenttime - _starttime >= _despawn_timer) then {_cleanmission = true;};
    if ((_playerPresent) || (_cleanmission)) then {_missiontimeout = false;};
};

 

 

if (_playerPresent) then {
waitUntil{{isPlayer _x && _x distance _deathcorpse > 300  } count playableunits > 0};
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"Death Body Lost has been finished", "PLAIN",10] call RE;
}else{
sleep _despawn_timer;
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"Death Body Lost has been finished", "PLAIN",10] call RE;
};

 

 

Link to comment
Share on other sites

10 hours ago, Corpulio_Hun said:

Hi,

Death body and marker is there, but nothing in the body inventory. Maybe i do something wrong?

  Reveal hidden contents

private ["_spawnRadius","_spawnMarker","_position","_positionarray","_mainpos","_markerRadius","_marker","_this","_center_1","_bodygroup","_deathcorpseskin","_randomCases","_despawn_timer",
"_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_spawnChance","_spawnRoll"];

_spawnChance =  0.70; // Percentage chance of event happening
_spawnRadius = 5000;
_spawnMarker = 'center';
_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
_positionarray = [
[(_position select 0) - 84.5, (_position select 1) - 21,-0.012],
[(_position select 0) - 70, (_position select 1) - 20,-0.012],
[(_position select 0) + 45, (_position select 1) + 25,-0.012],
[(_position select 0) + 96, (_position select 1) - 14,-0.012],
[(_position select 0) + 49, (_position select 1) + 17.5,-0.012],
[(_position select 0) + 38.5, (_position select 1) - 16,-0.012]
];
_mainpos = _positionarray call BIS_fnc_selectRandom;
_markerRadius = 350; // Radius the camp can spawn and used for the marker

if (isNil "EPOCH_EVENT_RUNNING") then {
EPOCH_EVENT_RUNNING = false;
};
 
// Check for another event running
if (EPOCH_EVENT_RUNNING) exitWith {
diag_log("Event already running");
};

EPOCH_EVENT_RUNNING = true;

// Random chance of event happening
_spawnRoll = random 1;
if (_spawnRoll > _spawnChance) exitWith {};

 

_marker_on_radius = createMarker ["bodycorpse",_position];
_marker_on_radius setMarkerShape "ELLIPSE";
_marker_on_radius setMarkerType "Cricle01";
_marker_on_radius setMarkerColor "ColorOrange";
_marker_on_radius setMarkerAlpha 0.8;
_marker_on_radius setMarkerBrush "Solid";
_marker_on_radius setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];

_marker = createMarker ["DeathLostBody", _position];
_marker setMarkerText "Death Lost Body";
_marker setMarkerType "mil_circle";
_marker setMarkerColor "ColorBlue";
_marker setMarkerBrush "Solid";
_marker setMarkerSize [0.1, 0.1];


_this = createCenter civilian;
_center_1 = _this;
_bodygroup = createGroup _center_1;
_deathcorpseskin = "INS_Lopotev_DZ";
_deathcorpse = objNull;
_deathcorpse = _bodygroup createUnit [_deathcorpseskin, [(_mainpos select 0) + 2, (_mainpos select 1) + 2], [], 1, "NONE"];
[_deathcorpse] joinSilent _bodygroup;
_deathcorpse playMove "AidlPpneMstpSnonWnonDnon_SleepA_death";
removeAllWeapons _deathcorpse;
removeAllItems _deathcorpse;
_randomCases = round(random(3));
switch (_randomCases) do {    
        case 0 :{
    _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
        };       
        case 1 :{
    _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
        };
        case 2 :{
    _deathcorpse addMagazine "ItemBriefcase100oz";
    _deathcorpse addMagazine "ItemRuby";
    _deathcorpse addMagazine "ItemEmerald";
        };
};

[nil,nil,rTitleText,"THERS A DEATH LOST FIND A REWARD IN HIS BODY","PLAIN",7.5] call RE;    


_despawn_timer = 500;
_missiontimeout = true;
_cleanmission = false;
_playerPresent = false;
_starttime = floor(time);
while {_missiontimeout} do {
    sleep 10;
    _currenttime = floor(time);
    {if((isPlayer _x) && (_x distance _deathcorpse <= 20)) then {_playerPresent = true};}forEach playableUnits;//check for nearest players
    if (_currenttime - _starttime >= _despawn_timer) then {_cleanmission = true;};
    if ((_playerPresent) || (_cleanmission)) then {_missiontimeout = false;};
};

 

 

if (_playerPresent) then {
waitUntil{{isPlayer _x && _x distance _deathcorpse > 300  } count playableunits > 0};
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"Death Body Lost has been finished", "PLAIN",10] call RE;
}else{
sleep _despawn_timer;
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"Death Body Lost has been finished", "PLAIN",10] call RE;
};

 

 

It's here.

Spoiler

_randomCases = round(random(3));
switch (_randomCases) do {    
        case 0 :{
    _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
        };       
        case 1 :{
    _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
        };
        case 2 :{
    _deathcorpse addMagazine "ItemBriefcase100oz";
    _deathcorpse addMagazine "ItemRuby";
    _deathcorpse addMagazine "ItemEmerald";
        };
};

In this code, random(3) will create value between 0 and 3, which will be "round"ed to 1 - 3.

So, the reward is selected from case 1, case 2 and case 3 - here, case 3 does not exist.

To fix this, change case 0 to case 3

 

Link to comment
Share on other sites

On 2017. 05. 18. at 11:06 AM, Schalldampfer said:

It's here.

  Reveal hidden contents

_randomCases = round(random(3));
switch (_randomCases) do {    
        case 0 :{
    _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
        };       
        case 1 :{
    _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
        };
        case 2 :{
    _deathcorpse addMagazine "ItemBriefcase100oz";
    _deathcorpse addMagazine "ItemRuby";
    _deathcorpse addMagazine "ItemEmerald";
        };
};

In this code, random(3) will create value between 0 and 3, which will be "round"ed to 1 - 3.

So, the reward is selected from case 1, case 2 and case 3 - here, case 3 does not exist.

To fix this, change case 0 to case 3

 

okay, i chang and not work. When i go in the body then finish the event. So what is wrong now?

Link to comment
Share on other sites

On 5/18/2017 at 5:06 AM, Schalldampfer said:

It's here.

  Reveal hidden contents

_randomCases = round(random(3));
switch (_randomCases) do {    
        case 0 :{
    _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
        };       
        case 1 :{
    _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
        };
        case 2 :{
    _deathcorpse addMagazine "ItemBriefcase100oz";
    _deathcorpse addMagazine "ItemRuby";
    _deathcorpse addMagazine "ItemEmerald";
        };
};

In this code, random(3) will create value between 0 and 3, which will be "round"ed to 1 - 3.

So, the reward is selected from case 1, case 2 and case 3 - here, case 3 does not exist.

To fix this, change case 0 to case 3

 

That's not quite correct, 0 1 2 is 3 items , the 0 is always included , changing the 0 to 3 will mean whatever reward is in 3 might not be located as 3 would be the 4th item 

Link to comment
Share on other sites

16 hours ago, dayz noob said:

That's not quite correct, 0 1 2 is 3 items , the 0 is always included , changing the 0 to 3 will mean whatever reward is in 3 might not be located as 3 would be the 4th item 

_randomCases = round(random(3)) will be 1, 2 and 3. Not 0, 1 and 2. 

Link to comment
Share on other sites

5 hours ago, Schalldampfer said:

_randomCases = round(random(3)) will be 1, 2 and 3. Not 0, 1 and 2. 

all my life i was think 0 is taked as 1.

_randomCases = round(random(3));

case 0

case 1

case 2

 

anyway guys if it give problems we can use:

private ["_randomNumbers"];
_randomNumbers = floor(random 100);

if (_randomNumbers <= 40) then { 
 _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
};
if (_randomNumbers <= 70 && _randomNumbers > 41) then { 
  _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
};
if (_randomNumbers <= 100 && _randomNumbers > 71) then { 
  _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
};

 

Link to comment
Share on other sites

7 minutes ago, Robert261171 said:

thanks mate

Spoiler

private ["_spawnRadius","_spawnMarker","_position","_positionarray","_mainpos","_markerRadius","_marker","_this","_center_1","_bodygroup","_deathcorpseskin","_despawn_timer",
"_missiontimeout","_cleanmission","_playerPresent","_starttime","_currenttime","_spawnChance","_spawnRoll","_randomNumbers"];

_spawnChance =  0.70; // Percentage chance of event happening
_spawnRadius = 5000;
_spawnMarker = 'center';
_position = [getMarkerPos "center",0,5500,10,0,2000,0] call BIS_fnc_findSafePos;
_positionarray = [
[(_position select 0) - 84.5, (_position select 1) - 21,-0.012],
[(_position select 0) - 70, (_position select 1) - 20,-0.012],
[(_position select 0) + 45, (_position select 1) + 25,-0.012],
[(_position select 0) + 96, (_position select 1) - 14,-0.012],
[(_position select 0) + 49, (_position select 1) + 17.5,-0.012],
[(_position select 0) + 38.5, (_position select 1) - 16,-0.012]
];
_mainpos = _positionarray call BIS_fnc_selectRandom;
_markerRadius = 350; // Radius the camp can spawn and used for the marker

if (isNil "EPOCH_EVENT_RUNNING") then {
EPOCH_EVENT_RUNNING = false;
};
 
// Check for another event running
if (EPOCH_EVENT_RUNNING) exitWith {
diag_log("Event already running");
};

EPOCH_EVENT_RUNNING = true;

// Random chance of event happening
_spawnRoll = random 1;
if (_spawnRoll > _spawnChance) exitWith {};

 

_marker_on_radius = createMarker ["bodycorpse",_position];
_marker_on_radius setMarkerShape "ELLIPSE";
_marker_on_radius setMarkerType "Cricle01";
_marker_on_radius setMarkerColor "ColorOrange";
_marker_on_radius setMarkerAlpha 0.8;
_marker_on_radius setMarkerBrush "Solid";
_marker_on_radius setMarkerSize [(_markerRadius + 50), (_markerRadius + 50)];

_marker = createMarker ["DeathLostBody", _position];
_marker setMarkerText "Death Lost Body";
_marker setMarkerShape "ICON";
_marker setMarkerType "SupplyVehicle";
_marker setMarkerColor "ColorBlue";
_marker setMarkerAlpha 1;
_marker setMarkerSize [0.1, 0.1];





_this = createCenter civilian;
_center_1 = _this;
_bodygroup = createGroup _center_1;
_deathcorpseskin = "INS_Lopotev_DZ";
_deathcorpse = objNull;
_deathcorpse = _bodygroup createUnit [_deathcorpseskin, [(_mainpos select 0) + 2, (_mainpos select 1) + 2], [], 1, "NONE"];
_deathcorpse setVariable ["bodyName","unknown",false];
[_deathcorpse] joinSilent _bodygroup;
_deathcorpse playMove "AidlPpneMstpSnonWnonDnon_SleepA_death";
removeAllWeapons _deathcorpse;
removeAllItems _deathcorpse;
_randomCases = round(random(3));

private ["_randomNumbers"];
_randomNumbers = floor(random 100);

if (_randomNumbers <= 40) then { 
 _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
};
if (_randomNumbers <= 70 && _randomNumbers > 41) then { 
  _deathcorpse addMagazine "ItemAmethyst";
    _deathcorpse addMagazine "ItemEmerald";
};
if (_randomNumbers <= 100 && _randomNumbers > 71) then { 
  _deathcorpse addMagazine "ItemSapphire";
    _deathcorpse addMagazine "ItemSapphire";
};


[nil,nil,rTitleText,"THERS A DEATH LOST FIND A REWARD IN HIS BODY","PLAIN",7.5] call RE;    


_despawn_timer = 500;
_missiontimeout = true;
_cleanmission = false;
_playerPresent = false;
_starttime = floor(time);
while {_missiontimeout} do {
    sleep 10;
    _currenttime = floor(time);
    {if((isPlayer _x) && (_x distance _deathcorpse <= 20)) then {_playerPresent = true};}forEach playableUnits;//check for nearest players
    if (_currenttime - _starttime >= _despawn_timer) then {_cleanmission = true;};
    if ((_playerPresent) || (_cleanmission)) then {_missiontimeout = false;};
};

 

 

if (_playerPresent) then {
waitUntil{{isPlayer _x && _x distance _deathcorpse > 500  } count playableunits > 0};
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"Death Body Lost has been finished", "PLAIN",10] call RE;
}else{
sleep _despawn_timer;
EPOCH_EVENT_RUNNING = false;
deleteVehicle _deathcorpse;
deleteMarker _marker_on_radius;
deleteMarker _marker;
[nil,nil,rTitleText,"Death Body Lost has been finished", "PLAIN",10] call RE;
};

try with it.. and tell me.. what happend

Link to comment
Share on other sites

6 hours ago, Robert261171 said:

It was working fine but now as you walk up to the body it disappears, have not put any other scripts in lately.. 

shoot the body before u walk close to it and it stays and has loot inside it, body dose despawn very fast after that tho maybe 10-20 seconds

@juandayz have you fixed the body despawning so fast ? i am presuming it is a sleep function ?

Link to comment
Share on other sites

7 minutes ago, dayz noob said:

shoot the body before u walk close to it and it stays and has loot inside it, body dose despawn very fast after that tho maybe 10-20 seconds

@juandayz have you fixed the body despawning so fast ? i am presuming it is a sleep function ?

yes i was doing that, im testing the other version that was put up..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...