Jump to content
Sign in to follow this  
pogoman979

Pogoman's Fast Zombies Script (w/ pathfinding)

Recommended Posts

Current version: 1.0

Script: http://www.box.net/shared/iu9nnfzrvd

About: Zombies will sprint after the player, and use custom made pathfinding to navigate around objects.

Installation: Make sure the mission has a BI functions module. To any unit you want to be a zombie add this line to it's init:

nul = this execFSM "zombieLogic.fsm";

and make sure the zombieLogic.fsm file is in the root directory of the mission folder. Note zombies will only attack sides that are set as their enemies.

Known Issues: Pathfinding calculations are done on the fly, and are not always completed in time. You can tell if a zombie is looking for a path if he slows from a sprint to a walk, and while walking he may travel through objects (i could've made the zombie halt and wait but it looks awful and i chose BI's method (you'll notice standard ai occasionally walk through objects when they are calculating a route)).

The method used for object detection is the command findEmptyPosition, which doesn't always detect correctly if a position is empty (usually occurs with various parts of fences), thus sometimes the zombie treats the position as empty and runs through it.

There are no zombie sounds or eating animations etc as they are the lowest priority and the pathfinding was the main purpose of this project.

Video (very old version):

Mpb3ziT16TY

Note all visual effects used in the video are not included in this script.

The hit effects i currently use are:

"ColorCorrections" ppEffectEnable true; 
"ColorCorrections" ppEffectAdjust [1.0, 1.0, 0.0, [1, 0, 0, 0.6], [0.0, 1.0, 1.0, 1.0],[0.199, 0.587, 0.114, 1.0]];
"ColorCorrections" ppEffectCommit 0;   
"ColorCorrections" ppEffectAdjust [1.0, 1.0, 0.0, [1, 0, 0, 0], [0.0, 1.0, 1.0, 1.0],[0.199, 0.587, 0.114, 1.0]];
"ColorCorrections" ppEffectCommit 1;   
enableCamShake true;
addCamShake [50,1,5];

and are not as ridiculously orange and blinding as in the video.

Edited by pogoman979

Share this post


Link to post
Share on other sites

I dont know if i should be diging this back up or not. But anyway i love the script but how would i make the zombies do more damage and how would i make zombies take more damage. When i was ingame the zombie hit me like 5 times and i did not die and i shot him 2 times and he died. I saw the file and have no idea even where to star looking to change these things.

Share this post


Link to post
Share on other sites

Great, thanks to your avatar now I'm hungry.

Taking a quick peek at that FSM you'd want to adjust the action of the Hit? decision box in order to make it do more damage. Seems to be a proximity over time damage system?

_time = time;
if (_zombie distance _zTarget <= _attackRange) then {
_zTarget setDamage (damage _zTarget + random [color="#FF0000"]0.1[/color]);
};

Increasing that 0.1 should do it. Not sure how to increase damage against the zombie though.

Share this post


Link to post
Share on other sites
Great, thanks to your avatar now I'm hungry.

Taking a quick peek at that FSM you'd want to adjust the action of the Hit? decision box in order to make it do more damage. Seems to be a proximity over time damage system?

_time = time;
if (_zombie distance _zTarget <= _attackRange) then {
_zTarget setDamage (damage _zTarget + random [color="#FF0000"]0.1[/color]);
};

Increasing that 0.1 should do it. Not sure how to increase damage against the zombie though.

Lol and thanks alot :)

Share this post


Link to post
Share on other sites

I just downloaded and tested, but, in my version anyway, the figure was teleporting every two seconds. Is that normal?

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  

×