Commited code so far, still not working

This commit is contained in:
Zepheris 2020-02-23 20:47:03 -07:00
parent a65fbddc73
commit 43487066d7

View File

@ -11,8 +11,11 @@ H8_DragAction = {
_unit = (_this select 0);
_epochID = (_this select 1);
_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, false];
[_unit, vehicle player, _epochID] remoteExec ["H8_fnc_attach",2];
_unit attachTo [player,[0,1,0]];
player playAction "grabDrag";
@ -22,30 +25,34 @@ H8_DragAction = {
H8_fnc_attach = {
_unit = (_this select 0);
_player = (_this select 1);
_unitID = (_this select 2);
_epochID = (_this select 2);
_id = format ["h8EF%1",_unitID];
0 = [_id, "onEachFrame", "H8_fnc_moveBody",[_unit,_player]] call BIS_fnc_addStackedEventHandler;
_output = format ["[dragBody] Debug: fnc_attach - %1",_epochID];
diag_log _output;
//_id = format ["h8EF%1",_epochID];
[_epochID, "onEachFrame", "H8_fnc_moveBody",[_unit,_player]] call BIS_fnc_addStackedEventHandler;
};
H8_fnc_moveBody = {
_unit = (_this select 0);
_unit = (_this select 0);
_player = (_this select 1);
diag_log "[dragBody] Debug: fnc_MoveBody";
// CREDIT TOO Das Attorney FOR CODE
_pos = _player modelToWorld [0,1,0];
_pos = _player modelToWorld [0,1,0];
_unit setPos _pos;
_unit setDir 180;
_unit switchMove "AinjPpneMrunSnonWnonDb";
};
H8_dropAction = {
_dropID = (_this select 0);
_unit = (_this select 0);
_epochID = (_this select 1);
// GLOBAL CODE
//0 = [[_unit, vehicle player,_unitID],"H8_fnc_detach",true] call BIS_fnc_MP;
[_unit, vehicle player, _epochID] remoteExec ["H8_fnc_detach",2,false];
_output = format ["[dragBody] Debug: Drop Action - %1",_epochID];
diag_log _output;
[_unit, vehicle player, _epochID] remoteExec ["H8_fnc_detach",2];
detach _unit;
// CLIENT SIDE
@ -56,10 +63,13 @@ H8_dropAction = {
H8_fnc_detach = {
_unit = (_this select 0);
_player = (_this select 1);
_unitID = (_this select 2);
_epochID = (_this select 2);
_id = format ["h8EF%1",_unitID];
0 = [_id, "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
_output = format ["[dragBody] Debug: fnc_detach - %1",_epochID];
diag_log _output;
//_id = format ["h8EF%1",_epochID];
[_epochID, "onEachFrame"] call BIS_fnc_removeStackedEventHandler;
sleep 0.05;
_relD = [_unit,_player] call BIS_fnc_dirTo;