juandayz Posted January 12, 2017 Report Share Posted January 12, 2017 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\ ¡ Reveal hidden contents 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: Reveal hidden contents SideShowFreak, WLF, Corpulio_Hun and 1 other 4 Link to comment Share on other sites More sharing options...
Cubitron Posted March 12, 2017 Report Share Posted March 12, 2017 Hi, event is runing buit no marker shows Link to comment Share on other sites More sharing options...
juandayz Posted March 14, 2017 Author Report Share Posted March 14, 2017 On 3/12/2017 at 9:29 AM, Cubitron said: Hi, event is runing buit no marker shows Expand hey! heres the bunch of code for markers Reveal hidden contents _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 More sharing options...
Cubitron Posted March 14, 2017 Report Share Posted March 14, 2017 i dont want to show exactly the body. There is no large Marker , i chnage the marker to another type an now its working juandayz 1 Link to comment Share on other sites More sharing options...
Corpulio_Hun Posted May 17, 2017 Report Share Posted May 17, 2017 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; }; Link to comment Share on other sites More sharing options...
Schalldampfer Posted May 18, 2017 Report Share Posted May 18, 2017 On 5/17/2017 at 10:55 PM, 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; }; Expand 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 Corpulio_Hun 1 Link to comment Share on other sites More sharing options...
Corpulio_Hun Posted May 21, 2017 Report Share Posted May 21, 2017 thx :) Link to comment Share on other sites More sharing options...
Corpulio_Hun Posted May 21, 2017 Report Share Posted May 21, 2017 On 5/18/2017 at 9: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 Expand 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 More sharing options...
dayz noob Posted May 24, 2017 Report Share Posted May 24, 2017 i have to shoot the body for the loot to show, but having issues with marker not removing after mission is completed, and not showing for players who log in after it spawns Link to comment Share on other sites More sharing options...
dayz noob Posted May 24, 2017 Report Share Posted May 24, 2017 On 5/18/2017 at 9: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 Expand 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 More sharing options...
Schalldampfer Posted May 25, 2017 Report Share Posted May 25, 2017 On 5/24/2017 at 5:26 PM, 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 Expand _randomCases = round(random(3)) will be 1, 2 and 3. Not 0, 1 and 2. Link to comment Share on other sites More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 On 3/14/2017 at 3:09 AM, juandayz said: _marker = createMarker ["DeathLostBody", _mainpos]; Expand Link to comment Share on other sites More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 It was working fine but now as you walk up to the body it disappears, have not put any other scripts in lately.. Link to comment Share on other sites More sharing options...
juandayz Posted May 25, 2017 Author Report Share Posted May 25, 2017 On 5/25/2017 at 9:59 AM, Schalldampfer said: _randomCases = round(random(3)) will be 1, 2 and 3. Not 0, 1 and 2. Expand 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 More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 have you got the complete script of that? Link to comment Share on other sites More sharing options...
juandayz Posted May 25, 2017 Author Report Share Posted May 25, 2017 On 5/25/2017 at 3:56 PM, Robert261171 said: have you got the complete script of that? Expand give me a second.. i just read all this issues... Link to comment Share on other sites More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 thanks mate Link to comment Share on other sites More sharing options...
juandayz Posted May 25, 2017 Author Report Share Posted May 25, 2017 On 5/25/2017 at 4:06 PM, Robert261171 said: thanks mate Expand Reveal hidden contents 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 More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 I will give it a try and let you know Link to comment Share on other sites More sharing options...
juandayz Posted May 25, 2017 Author Report Share Posted May 25, 2017 On 5/25/2017 at 4:42 PM, Robert261171 said: I will give it a try and let you know Expand nice, please quote me or tag me to get notify when you answer me Link to comment Share on other sites More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 On 5/25/2017 at 4:47 PM, juandayz said: nice, please quote me or tag me to get notify when you answer me Expand ok mate juandayz 1 Link to comment Share on other sites More sharing options...
dayz noob Posted May 25, 2017 Report Share Posted May 25, 2017 On 5/25/2017 at 9:59 AM, Schalldampfer said: _randomCases = round(random(3)) will be 1, 2 and 3. Not 0, 1 and 2. Expand that's incorrect, 0 is a number and it starts at 0, several dayz scripts use that method and all start at 0 Link to comment Share on other sites More sharing options...
dayz noob Posted May 25, 2017 Report Share Posted May 25, 2017 On 5/25/2017 at 3:30 PM, 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.. Expand 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 More sharing options...
Robert261171 Posted May 25, 2017 Report Share Posted May 25, 2017 On 5/25/2017 at 9:44 PM, 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 ? Expand yes i was doing that, im testing the other version that was put up.. Link to comment Share on other sites More sharing options...
dayz noob Posted May 25, 2017 Report Share Posted May 25, 2017 i havent had time to test the new edit juan put up, hopefully it works cos its a pretty cool event :) Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now