mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
test new way of zombie attack using PEH
This commit is contained in:
@@ -17,23 +17,21 @@ if ((speed _vehicle > 10)) exitWith {
|
|||||||
if (r_player_unconscious && _vehicle == player && _type == "zombie") then {
|
if (r_player_unconscious && _vehicle == player && _type == "zombie") then {
|
||||||
_rnd = (round(random 4)) + 1;
|
_rnd = (round(random 4)) + 1;
|
||||||
_move = "ZombieFeed" + str(_rnd);
|
_move = "ZombieFeed" + str(_rnd);
|
||||||
|
_zattacktype = 0;
|
||||||
} else {
|
} else {
|
||||||
if (_type == "zombie") then {
|
_zattacktype = 1;
|
||||||
_rnd = (round(random 9)) + 1;
|
_rnd = (round(random 9)) + 1;
|
||||||
_move = "ZombieStandingAttack" + str(_rnd);
|
_move = "ZombieStandingAttack" + str(_rnd);
|
||||||
} else {
|
|
||||||
_move = "Dog_Attack";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
_dir = [_unit,player] call BIS_Fnc_dirTo;
|
|
||||||
_unit setDir _dir;
|
|
||||||
|
|
||||||
// _unit playMove _move;
|
_dir = [_unit,player] call BIS_Fnc_dirTo;
|
||||||
|
|
||||||
if (local _unit) then {
|
if (local _unit) then {
|
||||||
|
_unit setDir _dir;
|
||||||
_unit switchMove _move;
|
_unit switchMove _move;
|
||||||
} else {
|
} else {
|
||||||
[objNull, _unit, rSwitchMove, _move] call RE;
|
PVDZE_zmb_switchMove = [_unit,_zattacktype,_rnd,_dir];
|
||||||
|
(owner _unit) publicVariableClient "PVDZE_zmb_switchMove";
|
||||||
};
|
};
|
||||||
|
|
||||||
//Wait
|
//Wait
|
||||||
|
|||||||
@@ -299,6 +299,25 @@ if (!isDedicated) then {
|
|||||||
//_id = [_pos,_unit] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
|
//_id = [_pos,_unit] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// perform attack locally [_zattacktype,_rnd,_dir]
|
||||||
|
local_animateZed = {
|
||||||
|
private ["_move","_rnd","_animtype","_animnum","_dir","_unit"];
|
||||||
|
_unit = _this select 0;
|
||||||
|
if (local _unit) then {
|
||||||
|
_animtype = _this select 1;
|
||||||
|
_animnum = _this select 2;
|
||||||
|
_dir = _this select 3;
|
||||||
|
if (_animtype == 0) then {
|
||||||
|
_move = "ZombieFeed" + str(_rnd);
|
||||||
|
} else {
|
||||||
|
_move = "ZombieStandingAttack" + str(_rnd);
|
||||||
|
};
|
||||||
|
_unit setDir _dir;
|
||||||
|
_unit switchMove _move;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
dayz_equipCheck = {
|
dayz_equipCheck = {
|
||||||
private ["_empty", "_needed","_diff","_success"];
|
private ["_empty", "_needed","_diff","_success"];
|
||||||
_config = _this;
|
_config = _this;
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ if (!isDedicated) then {
|
|||||||
"PVDZE_obj_Fire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
|
"PVDZE_obj_Fire" addPublicVariableEventHandler {nul=(_this select 1) spawn BIS_Effects_Burn};
|
||||||
"PVDZE_plr_FriendRQ" addPublicVariableEventHandler {cutText[(_this select 1),"PLAIN DOWN"];};
|
"PVDZE_plr_FriendRQ" addPublicVariableEventHandler {cutText[(_this select 1),"PLAIN DOWN"];};
|
||||||
|
|
||||||
"PVDZE_obj_Debris" addPublicVariableEventHandler {(_this select 1) call local_roadDebris};
|
"PVDZE_zmb_switchMove" addPublicVariableEventHandler {(_this select 1) call local_animateZed};
|
||||||
|
|
||||||
|
//"PVDZE_obj_Debris" addPublicVariableEventHandler {(_this select 1) call local_roadDebris};
|
||||||
|
|
||||||
"norrnRaDrag" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
|
"norrnRaDrag" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\animDrag.sqf"};
|
||||||
"norrnRnoAnim" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};
|
"norrnRnoAnim" addPublicVariableEventHandler {(_this select 1) execVM "\z\addons\dayz_code\medical\publicEH\noAnim.sqf"};
|
||||||
|
|||||||
Reference in New Issue
Block a user