Jump to content
Sign in to follow this  
juandayz

[Release]//\\ [No one left back!]

Recommended Posts

*Allow players to drag dead bodys of players, animals,zeds,  and load into vehicles or drop in some other place. Thers a risk to get a broken leg by the wheigt.

VIDEO:

Spoiler

 

 

INSTALL:

1-You will need a custom fn_selfactions.sqf

Spoiler

Find:


//Towing with tow truck
	/*
	if(_typeOfCursorTarget == "TOW_DZE") then {
		if (s_player_towing < 0) then {
			if(!(_cursorTarget getVariable ["DZEinTow", false])) then {
				s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_ATTACH" "\z\addons\dayz_code\actions\tow_AttachStraps.sqf",_cursorTarget, 0, false, true];				
			} else {
				s_player_towing = player addAction [localize "STR_EPOCH_ACTIONS_DETACH", "\z\addons\dayz_code\actions\tow_DetachStraps.sqf",_cursorTarget, 0, false, true];				
			};
		};
	} else {
		player removeAction s_player_towing;
		s_player_towing = -1;
	};
	*/

and below paste:


if (!_isAlive && {(_cursorTarget isKindOf "Man")}) then {
	if (s_player_dragdead < 0) then {
		s_player_dragdead = player addAction ["<t color='#D4909B'>Drag Corpse</t>", "scripts\dragcorpses\player_dragcorpse.sqf", _cursorTarget, 0, false,true];
		};
	} else {
		player removeAction s_player_dragdead;
		s_player_dragdead = -1;
};

 

Find:


} else {
	//Engineering
	

Below paste:


player removeAction s_player_dragdead;
s_player_dragdead = -1;

 

2-in your custom variables.sqf

Spoiler

Find:


//Player self-action handles
dayz_resetSelfActions = {

below paste:


s_player_dragdead = -1;

 

3-Create this path:  mpmissions\your instance\scripts\dragcorpses\

Spoiler

In this new path .. paste this two sqf.

player_dragcorpse.sqf

Spoiler


private ["_unit","_dragee","_pos","_dir","_addAction","_rand","_SetChance","_zeds"];
_dragee = _this select 3;
_unit = player;
_addAction = false;
_rand= round(random 10);
_SetChance = 2;
_zeds = "zZombie_base";
_zeds = _dragee isKindOf "zZombie_base";
if (isNull _dragee) exitWith {};
r_drag_sqf = true;
while {r_drag_sqf} do {
	if (!_addAction) then {
	    player removeAction s_player_dragdead;
		s_player_dragdead = -1;
		
		if  (_zeds) then {
		_unit switchmove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
		uiSleep 2;
		_dragee switchmove "AinjPfalMstpSnonWrflDnon_carried_Up";
		_dragee attachto [_unit,[0.1, 0, 0]];
		uiSleep 0.02;
		_dragee setDir 180;
		}else{
		_unit playActionNow "grabDrag";
		uiSleep 2;
		//_dragee switchmove "ainjppnemstpsnonwrfldb_still";		
		_dragee attachto [_unit,[0.1, 1.01, 0]];
		uiSleep 0.02;
		_dragee setDir 180;
		};			
		call fnc_usec_medic_removeActions;
		_loaddragee = _dragee getVariable["loaddragee",false];					
		uiSleep 1;
		_addAction = true;	
		playSound "heartbeat_1";
        addCamShake [2, 1, 25];	    
		uiSleep 8;
       if (_rand < _SetChance)  then {
	   disableserialization;
       r_fracture_legs = true;
       _unit setHit["legs",1];
      _unit setVariable ["hit_legs",0,false];
      _display = uiNamespace getVariable 'DAYZ_GUI_display';
      _control = _display displayCtrl 1203;
      _control ctrlShow true;
	  systemChat ("you broke your leg by the wheigt");	  
      r_drag_sqf = false;	  
      };
	  if (!_loaddragee) then {
		_dragee setVariable["loaddragee",true,true];		
		drop_corpse = player addAction ["<t color='#D4909B'>Drop/Load Corpse</t>", "scripts\dragcorpses\drop_body.sqf",_dragee, 0, false, true];
		};
	  systemChat ("do not run");
	  systemChat ("Find an open Vehicle to load the body");
	  };    
//Preventions   
	 (FindDisplay 106)closeDisplay 1;   //close gear if player open it          
    if (speed player > 15) then {r_drag_sqf = false;};//drop body if player run   
	if (vehicle player != player) then { //drop body if player get in a car
		player action ["eject", vehicle player];
		r_drag_sqf = false;
		};
//Preventions		
//how exit
	if (!r_drag_sqf) exitWith {
	_dragee setVariable["loaddragee",false,false];
	 resetCamShake;
	player removeAction drop_corpse;
	detach _dragee;
	_unit switchMove "";
	_dragee switchMove "";
	};
	uiSleep 0.001;
};

 

drop_body.sqf

Spoiler


private ["_allowedVehicles","_objects"];

_dragee = _this select 3;
_unit = player;

_loaddragee = _dragee getVariable["loaddragee",true];
_allowedVehicles = [
"hilux1_civil_3_open_DZE",
"datsun1_civil_3_open_DZE",
"hilux1_civil_1_open_DZE",
"datsun1_civil_1_open_DZE",
"V3S_Open_TK_CIV_EP1",
"V3S_Open_TK_EP1",
"KamazOpen_DZE"
];
_objects = nearestObjects [getPos player, _allowedVehicles, 10];
_objects = _objects select 0;
if(_loaddragee) then {

if (_unit distance _objects < 5) exitWith {

player removeAction drop_corpse;
r_drag_sqf = false;
detach _unit;
_unit switchMove "";
detach _dragee;
_dragee switchMove "";
_dragee attachTo [_objects, [0, -1, -1]];
_dragee setVariable["loaddragee",false,false];	
force_dropBody = false;
};

systemChat ("you need an open vehicle class");
player removeAction drop_corpse;
r_drag_sqf = false;
detach _unit;
_unit switchMove "";
detach _dragee;
_dragee switchMove "";
resetCamShake;
_dragee setVariable["loaddragee",false,false];
force_dropBody = false;
};

if (true) exitWith {};

 

 

 

and youre done!

This is an idea of @Anhor , also is dedicated for @azzdayz.  The script is a mixture of @oldmatechoc way, my way and default drag.sqf/carry.sqf.

Share this post


Link to post
Share on other sites

Awesome @juandayz

 

To make it a bit more realistic I change the vehicle list to this:

_loaddragee = _dragee getVariable["loaddragee",true];
_allowedVehicles = [
"S1203_ambulance_EP1",
"HMMWV_Ambulance",
"HMMWV_Ambulance_CZ_DES_EP1",
"GAZ_Vodnik_MedEvac",
"M113Ambul_TK_EP1",
"UH60M_MEV_EP1_DZ",
"pook_H13_medevac_CIV"
];

 

Share this post


Link to post
Share on other sites

Installed and get a weired error. I can take the body, but can´t move. Second time I try I broke my leg :blush:

The char doesen´t make the correct animation by drag the body. The corpse hang only between the legs on the ground.

BTW, no collisions with bury and butcher, take clothes and check wallet :wink:

Share this post


Link to post
Share on other sites
2 hours ago, Anhor said:

Installed and get a weired error. I can take the body, but can´t move. Second time I try I broke my leg :blush:

The char doesen´t make the correct animation by drag the body. The corpse hang only between the legs on the ground.

BTW, no collisions with bury and butcher, take clothes and check wallet :wink:

I ran into this problem when playing around with the other versions of this script. Im not 100% sure what causes it.

To be a bit more specific, the problem I sometimes get is with the animation of picking up the corpse "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon".
It completes the animation but once the _dragee is on the player's shoulders I am stuck. I can pivot and look around, just no foot movement.
You can press V to vault or C to crouch and sometimes you'll get out of it and youll run around like normal and the corpse will float around near you lol . Ive run into this with other playMove and switchMove animations though. Its not specific to this script.

Share this post


Link to post
Share on other sites
1 minute ago, oldmatechoc said:

I ran into this problem when playing around with the other versions of this script. Im not 100% sure what causes it.

It be a bit more specific, the problem I sometimes get is with the animation of picking up the corpse "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon".
It completes the animation but once the _dragee is on the player's shoulders I am stuck. I can pivot and look around, just no foot movement.
You can press V to vault or C to crouch and sometimes you'll get out of it and youll run around like normal and the corpse will float around near you lol . Ive run into this with other playMove and switchMove animations though. Its not specific to this script.

Maybe @juandayz knows a solution for it. I´m unable to try it further ........ running out of morphine sticks :tongue:

Share this post


Link to post
Share on other sites

the broke leg its an addon  you can remove it from this lines:

 if (_rand < _SetChance)  then {
	   disableserialization;
       r_fracture_legs = true;
       _unit setHit["legs",1];
      _unit setVariable ["hit_legs",0,false];
      _display = uiNamespace getVariable 'DAYZ_GUI_display';
      _control = _display displayCtrl 1203;
      _control ctrlShow true;
	  systemChat ("you broke your leg by the wheigt");	  
      r_drag_sqf = false;	  
      };

this issue

Quote

You can press V to vault or C to crouch and sometimes you'll get out of it and youll run around like normal and the corpse will float around near you lol

i see that when start to write it.. so my fix was add a speed restriction.. this line:

if (speed player > 15) then {r_drag_sqf = false;};//drop body if player run   

 

About the animations... zeds have diferent animation that players an animals.

the player dead and animal use the carry anymation, the zed use the oldma anim.

if  (_zeds) then {
		_unit switchmove "acinpknlmstpsraswrfldnon_acinpercmrunsraswrfldnon";
		uiSleep 2;
		_dragee switchmove "AinjPfalMstpSnonWrflDnon_carried_Up";
		_dragee attachto [_unit,[0.1, 0, 0]];
		uiSleep 0.02;
		_dragee setDir 180;
		}else{
		_unit playActionNow "grabDrag";
		uiSleep 2;
		//_dragee switchmove "ainjppnemstpsnonwrfldb_still";		
		_dragee attachto [_unit,[0.1, 1.01, 0]];
		uiSleep 0.02;
		_dragee setDir 180;
		};		

Do you have a video or something to see what happend on your specific case?

Share this post


Link to post
Share on other sites

The players love the animation for draging zeds ........ the char looks like drunken :biggrin:

BTW, I get the Flashlights and Siren for Police and Ambulance working for 1.0.6.1

 

Share this post


Link to post
Share on other sites

looks realy great.

But i have got errors in player RPT

 


Error in expression <_loaddragee) then {

if (_unit distance _objects < 5) exitWith {

player removeA>
  Error position: <_objects < 5) exitWith {

player removeA>
  Error Nicht definierte Variable in Ausdruck: _objects
File mpmissions\__CUR_MP.panthera2\scripts\dragcorpses\drop_body.sqf, line 20

Share this post


Link to post
Share on other sites
3 minutes ago, Kimarik said:

looks realy great.

But i have got errors in player RPT

 


Error in expression <_loaddragee) then {

if (_unit distance _objects < 5) exitWith {

player removeA>
  Error position: <_objects < 5) exitWith {

player removeA>
  Error Nicht definierte Variable in Ausdruck: _objects
File mpmissions\__CUR_MP.panthera2\scripts\dragcorpses\drop_body.sqf, line 20

add this 3 variables in private section of drop_body.sqf

,"_dragee","_unit","_loaddragee"

Share this post


Link to post
Share on other sites

@Anhor @oldmatechoc @azzdayz

Spoiler

Arm_A2_OA_2017-05-29_18-04-49-64.jpg

 

code:

player_dragbox.sqf

Spoiler


private ["_unit","_dragee","_pos","_dir","_addAction","_rand","_SetChance","_zeds"];
_dragee = _this select 3;
_unit = player;
_addAction = false;
if (isNull _dragee) exitWith {};
r_drag_box = true;
while {r_drag_box} do {
	if (!_addAction) then {
	    player removeAction s_player_dragbox;
		s_player_dragbox = -1;			
		
		_unit playActionNow "grabDrag";
		uiSleep 2;
		//_dragee switchmove "ainjppnemstpsnonwrfldb_still";		
		_dragee attachto [_unit,[0.1, 1.01, 0]];
		uiSleep 0.02;
		_dragee setDir 180;
		_loadbox = _dragee getVariable["loadbox",false];					
		uiSleep 1;
		
		_addAction = true;			
		uiSleep 1;
       
	   
	   
	   
	  if (!_loadbox) then {
		_dragee setVariable["loadbox",true,true];		
		drop_box = player addAction ["<t color='#D4909B'>Drop/Load box</t>", "scripts\drop_box.sqf",_dragee, 0, false, true];
		};
	  systemChat ("do not run");
	  systemChat ("Find  Vehicles to load the box");
	  };    
 
	 (FindDisplay 106)closeDisplay 1;   //close gear if player open it          
    if (speed player > 15) then {r_drag_box = false;};  
	if (vehicle player != player) then { 
		player action ["eject", vehicle player];
		r_drag_box = false;
		};

	if (!r_drag_box) exitWith {
	_dragee setVariable["loadbox",false,false];
	
	player removeAction drop_box;
	detach _dragee;
	_unit switchMove "";
	};
	uiSleep 0.001;
};

 

drop_box.sqf

Spoiler

private ["_allowedVehicles","_objects","_mypos","_dir"];

_dragee = _this select 3;
_unit = player;

_loadbox = _dragee getVariable["loadbox",true];

_objects = nearestObjects [getPos player, ["LandVehicle"], 4];
_objects = _objects select 0;
if(_loadbox) then {
_mypos = getposATL player;
_dir = getdir player;
_mypos = [(_mypos select 0)+2*sin(_dir),(_mypos select 1)+2*cos(_dir), (_mypos select 2)];

if (_unit distance _objects < 4) exitWith {

player removeAction drop_box;
r_drag_box = false;

detach _unit;
_unit switchMove "";
detach _dragee;


_dragee attachTo [_objects, [0, 0, 0]];
_dragee setVariable["loadbox",false,false];	

};

systemChat ("you need  vehicle to load it");
player removeAction drop_box;
r_drag_box = false;
detach _unit;
_unit switchMove "";
detach _dragee;
_dragee setDir _dir;
_dragee setposATL _mypos;
_dragee setVariable["loadbox",false,false];
};

if (true) exitWith {};

 

fn_selfactions.sqf

Spoiler

//find!!!!!!!!!!!
} else {
	//Engineering

//////PASTE BELOW!!!!!!!!!!!!!!
	player removeAction s_player_dragbox;
		s_player_dragbox = -1;

 

FIND:


//fuel tanks
	if (_hasEmptyFuelCan) then {
		{
			if (_cursorTarget isKindOf _x) exitWith {_isFuel = true;};
		} count dayz_fuelsources;
	};

PAste above:


//DRAG CRATES
	_iscrate = _typeOfCursorTarget in DZE_crates;
     if (_iscrate) then {
	if (s_player_dragbox < 0) then {
		s_player_dragbox = player addAction ["<t color='#D4909B'>Drag Box</t>", "scripts\player_dragbox.sqf", _cursorTarget, 0, false,true];
		};
	} else {
		player removeAction s_player_dragbox;
		s_player_dragbox = -1;
    };

 

variables.sqf

Spoiler

FIND:

//Player self-action handles
dayz_resetSelfActions = {

//paste BELOW
s_player_dragbox = -1;

And in somewhere paste


DZE_crates = ["USBasicWeapons_EP1",
"USBasicWeaponsBox",
"LocalBasicWeaponsBox",
"UNBasicWeapons_EP1",
"RUBasicWeaponsBox",
"TKBasicWeapons_EP1",
"CZBasicWeapons_EP1",
"SpecialWeaponsBox",
"USSpecialWeapons_EP1",
"USSpecialWeaponsBox",
"RUSpecialWeaponsBox",
"TKSpecialWeapons_EP1",
"GERBasicWeapons_EP1",
"GunrackUS_EP1",
"Gunrack2",
"GuerillaCacheBox",
"USOrdnanceBox_EP1",
"USOrdnanceBox",
"RUOrdnanceBox",
"BAF_BasicAmmunitionBox",
"BAF_Launchers",
"BAF_OrdnanceBox",
"BAF_VehicleBox",
"DZ_ExplosiveBoxRU",
"DZ_ExplosivesBoxUS",
"DZ_AmmoBoxRU",
"DZ_MedBox",
"DZ_CardboardBox",
"USLaunchers_EP1",
"USLaunchersBox",
"RULaunchersBox",
"TKLaunchers_EP1",
"USBasicAmmunitionBox_EP1",
"USBasicAmmunitionBox",
"LocalBasicAmmunitionBox",
"UNBasicAmmunitionBox_EP1",
"RUBasicAmmunitionBox",
"TKBasicAmmunitionBox_EP1",
"USVehicleBox",
"Ammobox_PMC",
"TKVehicleBox_EP1",
"USVehicleBox_EP1",
"RUVehicleBox"
];	

 

tnks @iben

Share this post


Link to post
Share on other sites

Funny!

But I run into another prob atm .......... I´m trying to add some "old" vehicles into our lingor server. Something like the AH1G "Cobra" (the Vietnam original) or the M113 A1 (also original Vietnam) or the original riverine boats (Zippos).

I allready have the pbo´s for it ....... with bisign´s ......... but there are for the Unsung Vietnam Mod.

My prob is, I have no clue about bisign´s ............

 

Share this post


Link to post
Share on other sites
Just now, Anhor said:

Funny!

But I run into another prob atm .......... I´m trying to add some "old" vehicles into our lingor server. Something like the AH1G "Cobra" (the Vietnam original) or the M113 A1 (also original Vietnam) or the original riverine boats (Zippos).

I allready have the pbo´s for it ....... with bisign´s ......... but there are for the Unsung Vietnam Mod.

My prob is, I have no clue about bisign´s ............

 

mmm are you talking about this mod or u are in a wrong place?:laugh:

Share this post


Link to post
Share on other sites
Just now, Anhor said:

@juandayz

my hope was that you or @oldmatechoc can help me with that ;)

 

oh yes,, check when you add some @mod folder.. you need a bikey. ( put it into key folder in root of your server files). Some @mods from armaholics are not signed by a key.. so you wasted.. also you need add the name of the mod into mission.sqm. at top

example:

Spoiler

addOns[]=
    {
        "ibr_panthera2",
        "map_eu",
        "ca_modules_animals",
        "dayz_anim",
        "dayz_code",
        "dayz_communityassets",
        "dayz_weapons",
        "dayz_equip",
        "cacharacters_pmc",
        "ca_modules_functions",
        "dayz_epoch",
        "warfarebuildings",
        "ind_tank",
        "camisc_e",
        "glt_m300t",
        "pook_h13",
        "csj_gyroac",
        "jetskiyanahuiaddon",
        "redryder",
        "Anzio_20",

"a new mod"

 
    };

and in your launcher.bat

Spoiler

echo off
start "arma2" /min "D:\epoch16\arma2oaserver.exe" -port=2302 "-config=instance_16_panthera\config.cfg" "-cfg=instance_16_panthera\basic.cfg" "-profiles=instance_16_panthera" -name=instance_16_panthera "-mod=@panthera;@ibr_plants;@ibr_rn;@DayZ_Epoch;@DayZ_Epoch_Server;@phantera;@newmodfolder"

 

for made a test.. try this skins. ( works on epoch cuz are signed with a key) i was using it for my epoch nuclear wars.

http://www.armaholic.com/page.php?id=18238

Share this post


Link to post
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

Sign in to follow this  

  • Similar Content

    • By Ghostrider-DbD-
      I wrote a quick script to add autorun to Epoch. Dowload from the link below and read the install instructions in the download.
      https://github.com/Ghostrider-DbD-/Epoch.Altis-Autorun/blob/master/Epoch.Altis/addons/DBD/canRun.sqf
    • By juandayz
      Small script for damage default cities.
      Do not use largest values on ratio... may causes lows fps.
      damage_cities.sqf
      and at bottom of init add:
      execVM "scripts\damage_cities.sqf"; Done!
      You also can add other things to damage.. for example
      _target = [4185.0303,4157.5503,0]; _damage_ratio=150; _server_x= _target nearObjects [["vehicles","Man"], _damage_ratio]; {_x setdammage 1} forEach _server_x; i dont know was usefull for me to simulate a nuclear dessease
    • By juandayz
      Is there any way to keep the values of this variables  humanKills //zombieKills// banditKills  . after player die?
      I mean you kill 10 zeds 10 bandits and 10 survivors/heros .. then you die and respawn with the sames values.  like humanity variable (persistent).
      cannot found where is reseted to 0.
    • By juandayz
      Well i took the @raymix suggestion and add his random locations. also i added a "Who lies here?" option.
       
       
      This Remove dead bodys and drops all dead players in a random  cemetarys.
      Death bodys spawns as a CrossHelmet with a crate with all his items (a merge with bury corpses)  and if ure using coins youre be able to "check wallet" on the dead crate.
      You just need Define a pos for the cemetary. (Must be a Big place to prevent issues.)
      Anyway i choose one pos for you.. in Kumyrna Town  but you can change it and add a marker.
      Take care with the mark body option in configvariables. dsnt needed since thers no body..  and the ooption in ESSV3 spawn in body.
      VIDEO: (in cherno map)
       
      1-Make a custom player_death.sqf.. (You know place it in mpmissions and call it from custom compiles.sqf)
      2-player_death.sqf
      3-into scripts\zsc\  create study_body.sqf
       
      4-in your custom fn_selfactions.sqf
      5-in your  custom variables.sqf
      change this line for place your cemetary in other location:
      _cemeteries = [ [[5205.2866, 8582.541,0],"kabanino"], [[8332.0488, 5945.0884, 0],"kumyrna"], [[10020.204, 5512.1753,0],"staroye"], [[11184.681, 12290.43,0],"krasnostav"], [[8531.7148, 11980.951,0],"Gvozdno"], [[6201.606, 10397.821,0],"Grishino"], [[4569.5361, 6375.5166,0],"pogorevka"], [[7417.0859, 5195.2876,0],"mogilevka"] ]; this other line define a safepos for the dead cross
      Find position minimum 1m from from Cemetary but not further than 20m, not closer than 2m to any other object, not in the water, maximum gradient of 20, not on the shoreline:
      _position = [_customPosition, 1, 20, 2, 0, 20, 0] call BIS_fnc_findSafePos;
    • By juandayz
      UPDATED 06/13/2017

      I WROTE THIS ADM PANEL FOR MY TEST SERVER. IS A REMAKE OF @NoxSicarius admintools. like a little admintools or something like this and have an easier install.
      You can see the options that it have from above (in the pic).
       
      INSTALL:
       
       
       
       
       
      old version
       
       
  • Advertisement
  • Donation Box

    Please donate to support the community.
    We appreciate all donations!
  • Advertisement
  • Supporters
  • Latest Donations

  • Advertisement
  • Discord

×