|
|
|
@ -5,25 +5,62 @@
|
|
|
|
|
Modified by Zepheris to work with A3 Epoch's Dyna Menu System
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
H8_CorpseDrag = {
|
|
|
|
|
params ["_corpse","_epochID"];
|
|
|
|
|
|
|
|
|
|
_output = format ["[dragBody] Debug: CorpseDrag - %1, %2, %3",player,_corpse,_epochID];
|
|
|
|
|
diag_log _output;
|
|
|
|
|
|
|
|
|
|
H8_DragAction = {
|
|
|
|
|
_unit = (_this select 0);
|
|
|
|
|
_epochID = (_this select 1);
|
|
|
|
|
if (local _corpse) then {
|
|
|
|
|
_output = format ["[dragBody] Debug: Corpse is Local - %1, %2, %3",player,_corpse,_epochID];
|
|
|
|
|
diag_log _output;
|
|
|
|
|
[_corpse,player,_epochID] call H8_DragAction;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
_output = format ["[dragBody] Debug: Corpse is *NOT* Local - %1, %2, %3",player,_corpse,_epochID];
|
|
|
|
|
diag_log _output;
|
|
|
|
|
[_corpse,player,_epochID] remoteexec ["H8_takeOwnCorpse",2];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
H8_takeOwnCorpse = {
|
|
|
|
|
_corpse = _this select 0;
|
|
|
|
|
_player = _this select 1;
|
|
|
|
|
_epochID = _this select 2;
|
|
|
|
|
|
|
|
|
|
_corpse setowner (owner _player);
|
|
|
|
|
_code = {
|
|
|
|
|
_corpse = _this select 0;
|
|
|
|
|
_player = _this select 1;
|
|
|
|
|
_epochID = _this select 2;
|
|
|
|
|
_start = diag_ticktime;
|
|
|
|
|
waituntil {diag_ticktime - _start > 5 || local (_this select 0)};
|
|
|
|
|
if (local (_this select 0)) then {
|
|
|
|
|
[_corpse, _player,_epochID] call H8_DragAction;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
_output = format ["[dragBody] Debug: Corpse: %1 - Code %2",_corpse, _code];
|
|
|
|
|
diag_log _output;
|
|
|
|
|
[[_corpse,_player,_epochID],_code] remoteexec ['BIS_fnc_spawn',_player];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
H8_dragAction = {
|
|
|
|
|
_corpse = (_this select 0);
|
|
|
|
|
_player = (_this select 1);
|
|
|
|
|
_epochID = (_this select 2);
|
|
|
|
|
|
|
|
|
|
_output = format ["[dragBody] Debug: Drag Action - %1",_epochID];
|
|
|
|
|
diag_log _output;
|
|
|
|
|
|
|
|
|
|
//[[_unit, vehicle player,_unitID],"H8_fnc_attach",true] call BIS_fnc_MP;
|
|
|
|
|
[_unit, vehicle player, _epochID] remoteExec ["H8_fnc_attach",2];
|
|
|
|
|
_unit attachTo [player,[0,1,0]];
|
|
|
|
|
[_corpse, _player, _epochID] remoteExec ["H8_fnc_attach",2];
|
|
|
|
|
_corpse attachTo [_player,[0,1,0]];
|
|
|
|
|
|
|
|
|
|
player playAction "grabDrag";
|
|
|
|
|
player forceWalk true;
|
|
|
|
|
_player playAction "grabDrag";
|
|
|
|
|
_player forceWalk true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
H8_fnc_attach = {
|
|
|
|
|
_unit = (_this select 0);
|
|
|
|
|
_corpse = (_this select 0);
|
|
|
|
|
_player = (_this select 1);
|
|
|
|
|
_epochID = (_this select 2);
|
|
|
|
|
|
|
|
|
@ -31,30 +68,28 @@ H8_fnc_attach = {
|
|
|
|
|
diag_log _output;
|
|
|
|
|
|
|
|
|
|
//_id = format ["h8EF%1",_epochID];
|
|
|
|
|
[_epochID, "onEachFrame", "H8_fnc_moveBody",[_unit,_player]] call BIS_fnc_addStackedEventHandler;
|
|
|
|
|
[_epochID, "onEachFrame", "H8_fnc_moveBody",[_corpse,_player]] call BIS_fnc_addStackedEventHandler;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
H8_fnc_moveBody = {
|
|
|
|
|
_unit = (_this select 0);
|
|
|
|
|
_corpse = (_this select 0);
|
|
|
|
|
_player = (_this select 1);
|
|
|
|
|
// CREDIT TOO Das Attorney FOR CODE
|
|
|
|
|
_pos = _player modelToWorld [0,1,0];
|
|
|
|
|
//Try changing these following commands to remoteExec
|
|
|
|
|
_unit setPos _pos;
|
|
|
|
|
_unit setDir 180;
|
|
|
|
|
_unit switchMove "AinjPpneMrunSnonWnonDb";
|
|
|
|
|
//diag_log "[dragBody] Debug: fnc_MoveBody";
|
|
|
|
|
_corpse setPos _pos;
|
|
|
|
|
_corpse setDir 180;
|
|
|
|
|
_corpse switchMove "AinjPpneMrunSnonWnonDb";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
H8_dropAction = {
|
|
|
|
|
_unit = (_this select 0);
|
|
|
|
|
_corpse = (_this select 0);
|
|
|
|
|
_epochID = (_this select 1);
|
|
|
|
|
|
|
|
|
|
_output = format ["[dragBody] Debug: Drop Action - %1",_epochID];
|
|
|
|
|
diag_log _output;
|
|
|
|
|
|
|
|
|
|
[_unit, vehicle player, _epochID] remoteExec ["H8_fnc_detach",2];
|
|
|
|
|
detach _unit;
|
|
|
|
|
[_corpse, vehicle player, _epochID] remoteExec ["H8_fnc_detach",2];
|
|
|
|
|
detach _corpse;
|
|
|
|
|
|
|
|
|
|
// CLIENT SIDE
|
|
|
|
|
player playMove "amovpknlmstpsraswrfldnon";
|
|
|
|
|