Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies and more


Walking zombies? (Solved!)


Recommended Posts

Well i'm still new to scripting but I have figured it out, for anyone else trying to work out this headache to get server side walking zombies, here it is...........

 

Requires:

notepad

PBO Manager

Patience ;)

 

1. Find your dayz_code.pbo and extract the 4 files

 

(from compiles folder)

 

control_zombieAgent.sqf

zombie_generate.sqf

wild_spawnZombies.sqf

 

(from system folder)

 

zombie_agent.fsm

 

Create a folder in your mission.pbo folder called "Scripts" , and place the 4 files in there

 

2. open your "control_zombieAgent.sqf" and look for "forcespeed" under Chase Target area and make sure it is set at 2 (default 10)

 

	//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 2;
	sleep 1;
};
//LOOP
_agent setVariable ["targets",[],true];
_isAlive = alive _agent;
sleep 1;
};

 

3. next go to your "zombie_generate.sqf" and at the bottom you should see

 

//Start behavior
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";

 

change it to

 

//Start behavior
_id = [_position,_agent] execFSM "Scripts\zombie_agent.fsm";

 

4. Next open your "wild_spawnZombies.sqf" and search for

 

//Start behavior
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";

 

change to

 

//Start behavior
_id = [_position,_agent] execFSM "Scripts\zombie_agent.fsm";

 

5. Open your "zombie_agent.fsm" and look for

 

class Chase
   {
     name = "Chase";
     init = /*%FSM*/"_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 10;" \n
      "" \n
      "if (_losCheck == 2) then {" \n
      "	_losCheck = 0;" \n
      "	_cantSee = [_agent,_target] call dayz_losCheck;" \n

 

and change "_agent forcespeed 10;" to 2

 

6. In your "mission.pbo" go to the "init" folder and open "compiles" then look for the following

 

// control_zombieAgent = 		compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";

change to

// control_zombieAgent = 		compile preprocessFileLineNumbers "Scripts\control_zombieAgent.sqf";

 

zombie_generate = 			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf";			//Server compile, used for loiter behaviour

change to

zombie_generate = 			compile preprocessFileLineNumbers "Scripts\zombie_generate.sqf";

 

wild_spawnZombies = 			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\wild_spawnZombies.sqf";			//Server compile, used for loiter behaviour

change to

wild_spawnZombies = 			compile preprocessFileLineNumbers "Scripts\wild_spawnZombies.sqf";

 

7. Repack your mission.pbo and give it a try

 

Remember to change the command lines in the scripts if your running them in a custom script folder and remember to double check the command line text or you will load up and start swearing like I did ;)

Share this post


Link to post
Share on other sites

Well i'm still new to scripting but I have figured it out, for anyone else trying to work out this headache to get server side walking zombies, here it is...........

 

Requires:

notepad

PBO Manager

Patience ;)

 

1. Find your dayz_code.pbo and extract the 4 files

 

(from compiles folder)

 

control_zombieAgent.sqf

zombie_generate.sqf

wild_spawnZombies.sqf

 

(from system folder)

 

zombie_agent.fsm

 

Create a folder in your mission.pbo folder called "Scripts" , and place the 4 files in there

 

2. open your "control_zombieAgent.sqf" and look for "forcespeed" under Chase Target area and make sure it is set at 2 (default 10)

 

	//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 2;
	sleep 1;
};
//LOOP
_agent setVariable ["targets",[],true];
_isAlive = alive _agent;
sleep 1;
};

 

3. next go to your "zombie_generate.sqf" and at the bottom you should see

 

//Start behavior
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";

 

change it to

 

//Start behavior
_id = [_position,_agent] execFSM "Scripts\zombie_agent.fsm";

 

4. Next open your "wild_spawnZombies.sqf" and search for

 

//Start behavior
_id = [_position,_agent] execFSM "\z\AddOns\dayz_code\system\zombie_agent.fsm";

 

change to

 

//Start behavior
_id = [_position,_agent] execFSM "Scripts\zombie_agent.fsm";

 

5. Open your "zombie_agent.fsm" and look for

 

class Chase
   {
     name = "Chase";
     init = /*%FSM*/"_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 10;" \n
      "" \n
      "if (_losCheck == 2) then {" \n
      "	_losCheck = 0;" \n
      "	_cantSee = [_agent,_target] call dayz_losCheck;" \n

 

and change "_agent forcespeed 10;" to 2

 

6. In your "mission.pbo" go to the "init" folder and open "compiles" then look for the following

 

// control_zombieAgent = 		compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\control_zombieAgent.sqf";

change to

// control_zombieAgent = 		compile preprocessFileLineNumbers "Scripts\control_zombieAgent.sqf";

 

zombie_generate = 			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\zombie_generate.sqf";			//Server compile, used for loiter behaviour

change to

zombie_generate = 			compile preprocessFileLineNumbers "Scripts\zombie_generate.sqf";

 

wild_spawnZombies = 			compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\wild_spawnZombies.sqf";			//Server compile, used for loiter behaviour

change to

wild_spawnZombies = 			compile preprocessFileLineNumbers "Scripts\wild_spawnZombies.sqf";

 

7. Repack your mission.pbo and give it a try

 

Remember to change the command lines in the scripts if your running them in a custom script folder and remember to double check the command line text or you will load up and start swearing like I did ;)

Share this post


Link to post
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Added Script as show and the zombies did stop running.... but now they seem to not move at all they just stand in one spot as if concreted to the ground. any clues or suggestions?

Share this post


Link to post
Share on other sites

Added Script as show and the zombies did stop running.... but now they seem to not move at all they just stand in one spot as if concreted to the ground. any clues or suggestions?

Share this post


Link to post
Share on other sites

  • 2 months later...

I dont have a "control_zombieAgent.sqf" in my DayZ_code.pbo... I have the other ones listed that it tells me to find but not Control_zombieAgent.sqf.

 

I do also have zombie_findtarget.sqf and zombie_findtargetAgent.sqf but nothing with control in it.. any ideas???

Share this post


Link to post
Share on other sites

I dont have a "control_zombieAgent.sqf" in my DayZ_code.pbo... I have the other ones listed that it tells me to find but not Control_zombieAgent.sqf.

 

I do also have zombie_findtarget.sqf and zombie_findtargetAgent.sqf but nothing with control in it.. any ideas???

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...