Jump to content
Sign in to follow this  
moartuba

Why is this not being executed in game?

Recommended Posts

This is in the .pbo main dayz code file so why is it not being executed in game?


_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"];
_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;
};
*///_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];_handle = _this select 3;
_handle setFSMVariable ["_command","stay"];_array = _this select 3;
_handle = _array;
//_target = _array select 1;
_target = target1;
_handle setFSMVariable ["_command","track"];
_handle setFSMVariable ["_target",_target];
_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];
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 ["Warn",_actionDir + "warn.sqf",[_handle,true], 2, false, true];
_handle setFSMVariable ["_actionWarn",_actionWarn];

Share this post


Link to post
Share on other sites

This is chinese to me, I'm sorry I can only code lua.

I believe it is actually a lua or c++ derivation. some items like setSFMvariable come from the arma2 engine's library.

Share this post


Link to post
Share on other sites

It's code for the effing dog that is expected to be in the next patch. What this thread is about is beyond me.

Share this post


Link to post
Share on other sites

It's code for the effing dog that is expected to be in the next patch. What this thread is about is beyond me.

Thank you, I didn't see the word dog, thanks!

If it is in the dayzcode.pbo file already, why is it not presented in game?

Share this post


Link to post
Share on other sites

This is chinese to me, I'm sorry I can only code lua.

If you knew lua, that wouldn't be chinese for you. Because it's lua.

Share this post


Link to post
Share on other sites

If you knew lua, that wouldn't be chinese for you. Because it's lua.

If you knew lua, that wouldn't be chinese for you. Because it's lua.

Lol. Anyway, it's not in because it is not scripted into servers. It is just there to be able to be enabled.

Share this post


Link to post
Share on other sites

I'm too tired... I meant it isn't unusual to combine c++/cpp and lua scripts. Therefore the codes above wouldn't be Chinese to someone are known with lua.

Edited by Heradon

Share this post


Link to post
Share on other sites

Lol. Anyway, it's not in because it is not scripted into servers. It is just there to be able to be enabled.

Ah I see. To me, I usually don't leave code in that just sits there not doing anything. Could this possibly be causing problems we are seeing in 1.7.2.5? Most likely it isn't, but If it even has a chance of causing conflicts, than why leave it in there when it's not doing anything? I would have left it on the side till the whole dogs update and tested it privately before even adding it since it's not crucial and will definitely have some bugs (everything anyone codes will have bugs).

Share this post


Link to post
Share on other sites

Ah I see. To me, I usually don't leave code in that just sits there not doing anything. Could this possibly be causing problems we are seeing in 1.7.2.5? Most likely it isn't, but If it even has a chance of causing conflicts, than why leave it in there when it's not doing anything? I would have left it on the side till the whole dogs update and tested it privately before even adding it since it's not crucial and will definitely have some bugs (everything anyone codes will have bugs).

It cannot in anyway conflict with anything, as it is not being used. Without the next update the other files will not make this code run. Of course you could edit your files and make it, but there would be no design for it andthe servers would also kick you for invalid files.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×