This commit is contained in:
Aaron Clark
2012-11-04 20:28:50 -06:00
commit 76e9a0582e
1049 changed files with 94406 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
_dog = _this select 0;
_array = _this select 3;
_handle = _array select 0;
_type = _array select 1;
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
if (_onLadder) exitWith {cutText [(localize "str_player_21") , "PLAIN DOWN"]};
player playActionNow "PutDown";
switch (_type) do {
case 0: {
player removeMagazine "FoodSteakRaw";
_handle setFSMVariable ["_hunger",0];
};
case 1: {
player removeMagazine "ItemWaterbottle";
player addMagazine "ItemWaterbottleUnfilled";
_handle setFSMVariable ["_hunger",0];
};
};

View File

@@ -0,0 +1,13 @@
_dog = _this select 0;
_array = _this select 3;
_handle = _array select 0;
_whistle = _array select 1;
if(_whistle) then {
[nil,player,rSAY,["dog_callBack", 120]] call RE;
};
sleep 1;
_handle setFSMVariable ["_command","none"];

View File

@@ -0,0 +1,19 @@
_dog = _this select 0;
_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;
};
*/

View File

@@ -0,0 +1,33 @@
//_dog = _this select 0;
_array = _this select 3;
_handle = _array select 0;
_whistle = _array select 1;
_forceWalk = _array select 2;
_dog = _handle getFSMVariable "_dog";
_maxSpeed = _handle getFSMVariable "_maxSpeed";
if(player distance _dog < 5) then {
_whistle = false;
};
if(_forceWalk) then {
_maxSpeed = _maxSpeed - 1;
if (_maxSpeed < 0) then {
_maxSpeed = 0;
};
if(_whistle) 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];

View File

@@ -0,0 +1,12 @@
_dog = _this select 0;
_handle = _this select 3;
_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_LieDown"] call RE;
};

View File

@@ -0,0 +1,8 @@
_array = _this select 3;
_handle = _array;
//_target = _array select 1;
_target = target1;
_handle setFSMVariable ["_command","track"];
_handle setFSMVariable ["_target",_target];

View File

@@ -0,0 +1,40 @@
_dog = _this select 0;
_array = _this select 3;
_handle = _array select 0;
_watchDog = _array select 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];
while {_watchDog and alive _dog} do {
_watchDog = _handle getFSMVariable "_watchDog";
_senseSkill = _handle getFSMVariable "_senseSkill";
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;
};
} else {
_actionWarn = _dog addAction ["Alert",_actionDir + "warn.sqf",[_handle,true], 2, false, true];
_handle setFSMVariable ["_actionWarn",_actionWarn];
_handle setFSMVariable ["_idleTime",1];
};