Re: RELEASE : DaiZy 2018 [27/02/2014 UPDATED]

Posted by Mindjacker on
URL: http://kodabar-dayz-daizy-single-player-forum.163.s1.nabble.com/RELEASE-DaiZy-2018-v1-5-04-06-2014-UPDATED-tp14780p16486.html

I found this out how to change between walking and running now

F:\Steam\SteamApps\common\Arma 2 Operation Arrowhead\@2018\Addons\dayz_code\system\zombie_agent

class Chase
    {
      name = "Chase";
      init = /*%FSM<STATEINIT""">*/"_timeN = time;" \n
       "" \n
       "if (speed _agent < 0.1) then {_countr = _countr + 1} else {_countr = 0};" \n
       "_target = _agent call zombie_findTargetAgent;" \n
       "_isAlive = alive _agent;" \n
       "_targetPos = getPosATL _target;" \n
       "" \n
       "" \n
       "//Move to target" \n
       "_agent moveTo _targetPos;" \n
       "_agent forceSpeed 6;" \n

F:\Steam\SteamApps\common\Arma 2 Operation Arrowhead\@2018\Addons\dayz_code\compile\control_zombieAgent

//CHASE TARGET
       
        //Leader cries out
        [_agent,"attack",0,false] call dayz_zombieSpeak;
       
        //Start Movement loop
        while {!isNull _target and _isAlive and _isSomeone} do {
                _target = _agent call zombie_findTargetAgent;
                _isAlive = alive _agent;
                _targetPos = getPosATL _target;
                //Move to target
                _agent moveTo _targetPos;
                _agent forceSpeed 8;
                sleep 1;

Changing the default forceSpeed value to 2 puts the zeds in TWD mode anything higher than 3 puts them into vanilla 28 days later running mode.

I am a total noob at this Arma 2 OA scripting. Is there a way to make it randomly alternate between forceSpeed 2 and forceSpeed 3 and would that mix up the variety of the spawning zeds?