mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-22 16:10:49 +03:00
0.1
This commit is contained in:
33
dayz_code/actions/dog/speed.sqf
Normal file
33
dayz_code/actions/dog/speed.sqf
Normal 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];
|
||||
Reference in New Issue
Block a user