mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-15 04:32:56 +03:00
1.7.5.D1208
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
_dog = _this select 0;
|
||||
private ["_array", "_handle", "_type", "_onLadder"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_type = _array select 1;
|
||||
@@ -12,10 +12,15 @@ switch (_type) do {
|
||||
case 0: {
|
||||
player removeMagazine "FoodSteakRaw";
|
||||
_handle setFSMVariable ["_hunger",0];
|
||||
player removeAction s_player_feeddog;
|
||||
s_player_feeddog = -1;
|
||||
|
||||
};
|
||||
case 1: {
|
||||
player removeMagazine "ItemWaterbottle";
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
_handle setFSMVariable ["_hunger",0];
|
||||
_handle setFSMVariable ["_thirst",0];
|
||||
player removeAction s_player_waterdog;
|
||||
s_player_waterdog = -1;
|
||||
};
|
||||
};
|
||||
@@ -1,7 +1,8 @@
|
||||
_dog = _this select 0;
|
||||
private["_array","_handle","_whistle","_dog"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_whistle = _array select 1;
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
|
||||
if(_whistle) then {
|
||||
[nil,player,rSAY,["dog_callBack", 120]] call RE;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
_array = _this select 3;
|
||||
_handle = _array;
|
||||
private ["_handle"];
|
||||
_handle = _this select 3;
|
||||
|
||||
_handle setFSMVariable ["_command","move"];
|
||||
|
||||
|
||||
@@ -1,19 +1,5 @@
|
||||
_dog = _this select 0;
|
||||
private ["_dog"];
|
||||
_dog = _this select 3;
|
||||
|
||||
_dog playActionNow "GestureBark";
|
||||
[_dog,"dog_bark",0,false] call dayz_zombieSpeak;
|
||||
/*
|
||||
_anim = animationState _dog;
|
||||
_sitDown = false;
|
||||
if(_anim == "Dog_SitDown") then {
|
||||
[objNull, _dog, rSwitchMove,"Dog_SitUp"] call RE;
|
||||
sleep 1;
|
||||
_sitDown = true;
|
||||
};
|
||||
|
||||
[objNull, _dog, rSwitchMove,"Dog_StopV2"] call RE;
|
||||
|
||||
if (_sitDown) then {
|
||||
waitUntil{(animationState _dog) != "Dog_StopV2"};
|
||||
[objNull, _dog, rSwitchMove,"Dog_SitDown"] call RE;
|
||||
};
|
||||
*/
|
||||
[_dog,"dog_bark",0,false] call dayz_zombieSpeak;
|
||||
@@ -1,33 +1,16 @@
|
||||
//_dog = _this select 0;
|
||||
private ["_array", "_handle", "_speed", "_dog"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_whistle = _array select 1;
|
||||
_forceWalk = _array select 2;
|
||||
_speed = _array select 1;
|
||||
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
_maxSpeed = _handle getFSMVariable "_maxSpeed";
|
||||
player removeAction s_player_speeddog;
|
||||
s_player_speeddog = -1;
|
||||
|
||||
if(player distance _dog < 5) then {
|
||||
_whistle = false;
|
||||
};
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
|
||||
if(_forceWalk) then {
|
||||
_maxSpeed = _maxSpeed - 1;
|
||||
if (_maxSpeed < 0) then {
|
||||
_maxSpeed = 0;
|
||||
};
|
||||
if(_whistle) then {
|
||||
if(player distance _dog > 5) then {
|
||||
[nil,player,rSAY,["dog_slowDown", 120]] call RE;
|
||||
};
|
||||
} else {
|
||||
_maxSpeed = _maxSpeed + 1;
|
||||
if (_maxSpeed > 2) then {
|
||||
_maxSpeed = 2;
|
||||
};
|
||||
if(_whistle) then {
|
||||
[nil,player,rSAY,["dog_speedUp", 120]] call RE;
|
||||
};
|
||||
};
|
||||
|
||||
_handle setFSMVariable ["_maxSpeed",_maxSpeed];
|
||||
_handle setFSMVariable ["_forceChange",true];
|
||||
_handle setFSMVariable ["_maxSpeed", _speed];
|
||||
_dog setVariable ["currentSpeed", _speed];
|
||||
@@ -1,12 +1,13 @@
|
||||
_dog = _this select 0;
|
||||
private ["_handle", "_dog", "_standing", "_watchDog", "_anim"];
|
||||
_handle = _this select 3;
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
_standing = _handle getFSMVariable "_standing";
|
||||
_handle setFSMVariable ["_command","stay"];
|
||||
_watchDog = _handle getFSMVariable "_watchDog";
|
||||
|
||||
_anim = animationState _dog;
|
||||
if (_anim == "Dog_SitDown" and _watchDog) then {
|
||||
[objNull, _dog, rSwitchMove,"Dog_SitUp"] call RE;
|
||||
sleep 0.5;
|
||||
//[objNull, _dog, rSwitchMove,"Dog_SitUp"] call RE;
|
||||
//sleep 0.5;
|
||||
[objNull, _dog, rSwitchMove,"Dog_LieDown"] call RE;
|
||||
};
|
||||
@@ -1,8 +1,5 @@
|
||||
_array = _this select 3;
|
||||
_handle = _array;
|
||||
//_target = _array select 1;
|
||||
|
||||
_target = target1;
|
||||
private ["_handle"];
|
||||
_handle = _this select 3;
|
||||
|
||||
_handle setFSMVariable ["_command","track"];
|
||||
_handle setFSMVariable ["_target",_target];
|
||||
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
_dog = _this select 0;
|
||||
private ["_array", "_handle", "_watchDog", "_dog", "_warn"];
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_watchDog = _array select 1;
|
||||
_dog = _handle getFSMVariable "_dog";
|
||||
|
||||
player removeAction s_player_warndog;
|
||||
s_player_warndog = -1;
|
||||
|
||||
_handle setFSMVariable ["_watchDog",_watchDog];
|
||||
|
||||
_actionWarn = _handle getFSMVariable "_actionWarn";
|
||||
_actionDir = _handle getFSMVariable "_actionDir";
|
||||
_dog removeAction _actionWarn;
|
||||
|
||||
if (_watchDog) then {
|
||||
_actionWarn = _dog addAction ["Quiet",_actionDir + "warn.sqf",[_handle,false], 2, false, true];
|
||||
_handle setFSMVariable ["_actionWarn",_actionWarn];
|
||||
_handle setFSMVariable ["_idleTime",5];
|
||||
_warn = {
|
||||
_handle = _this select 0;
|
||||
while {_watchDog and alive _dog} do {
|
||||
_watchDog = _handle getFSMVariable "_watchDog";
|
||||
_senseSkill = _handle getFSMVariable "_senseSkill";
|
||||
@@ -20,21 +18,16 @@ if (_watchDog) then {
|
||||
_nearby = (getPosATL _dog) nearEntities ["CAManBase",_senseSkill];
|
||||
_nearby = _nearby - [player];
|
||||
if (count _nearby > 0) then {
|
||||
//_chance = (3 - (count _nearby));
|
||||
//hintSilent str(_chance);
|
||||
[_dog,"dog_growl",2,false] call dayz_zombieSpeak;
|
||||
} else {
|
||||
/*
|
||||
_nearby = (getPosATL _dog) nearEntities ["CAAnimalBase",_senseSkill];
|
||||
_nearby = _nearby - [_dog];
|
||||
[_dog,"dog_bark",1,false] call dayz_zombieSpeak;
|
||||
*/
|
||||
};
|
||||
};
|
||||
sleep 2;
|
||||
};
|
||||
};
|
||||
|
||||
if (_watchDog) then {
|
||||
_handle setFSMVariable ["_idleTime",5];
|
||||
[_handle] spawn _warn;
|
||||
} else {
|
||||
_actionWarn = _dog addAction ["Alert",_actionDir + "warn.sqf",[_handle,true], 2, false, true];
|
||||
_handle setFSMVariable ["_actionWarn",_actionWarn];
|
||||
_handle setFSMVariable ["_idleTime",1];
|
||||
};
|
||||
Reference in New Issue
Block a user