I recently played COD:BO and the zombie mode sort of pushed me to do a remake in FPSC.
At first I thought it would be all so simple,come to find out I was as wrong as I could have been.
Even though it's still a work in progress,the basic stuff is done.
However one thing you should know,
this is not for beginners!!!. It also requires RPG Mod , but can easily be integrated into project blue , as it uses variables to function.
So here's the basic idea of how this works.
You have points from which the zombies will enter.From a certain distance to each point there will be a waypoint to guide the zombie(s) in that row until he/they enter(s) the bunker,room or whatever.
Now before we get into all of that , we need to seperate the zombies into waves.To do so ,
we'll place a few zombies on the screen and name 4 of them t1.The trick here is to set the zombies option of spawning at start to
NO and using a trigger zone,which will be placed outside of the walkable zone,to spawn every zombie with a certain name (in this case t1).
Before we start to write the script for the spawning we need a preperation script which will create some variables for us first.These variables will hold the following things :
zombie kill count ,
current amount of money and
if the zombies have broken the barriers.
The script must be placed in a trigger zone,as it's main script :
;Artificial Intelligence Script
;Header
desc = Nacht der Untoten zombie system by Gencheff
;Triggers
:state=0:rpg_newvar=money,rpg_initvar=money 0,rpg_newvar=killcount,rpg_initvar=killcount 0,rpg_newvar=barrier1,rpg_initvar=barrier1 0,rpg_newvar=barrier2,rpg_initvar=barrier2 0,rpg_newvar=barrier3,rpg_initvar=barrier3 0,rpg_newvar=barrier4,rpg_initvar=barrier4 0,fpgcrawtextsize=18,fpgcrawtextfont=arial,fpgcrawtextr=200,fpgcrawtextg=200,fpgcrawtextb=200,fpgcrawtextx=80,fpgcrawtexty=90,state=1
:state=1,rpg_varisequalto=&killcount 4:fpgcrawtext=Wave : II
:state=1,rpg_varisequalto=&killcount 11:fpgcrawtext=Wave : III
:state=1,rpg_varisequalto=&killcount 20:fpgcrawtext=Wave : IV
:state=1,rpg_varisequalto=&killcount 35:fpgcrawtext=Wave : V
;End of Script
Next thing we need to do is place a few other trigger zones and apply the wave scripts to each one and in each trigger zone's IF USED field write the name of the character wave you wish to be spawned.
Waves 1-3 scripts :
Wave1: ;Artificial Intelligence Script
;Header
desc = Plr In Zone, activate entity specified in IF USED
;Triggers
:state=0,rpg_varisequalto=&killcount 0:activateifused=1,sound=$0,state=1
Wave 2 : ;Artificial Intelligence Script
;Header
desc = Plr In Zone, activate entity specified in IF USED
;Triggers
:state=0,rpg_varisequalto=&killcount 4:activateifused=1,sound=$0,state=1
Wave 3 : ;Artificial Intelligence Script
;Header
desc = Plr In Zone, activate entity specified in IF USED
;Triggers
:state=0,rpg_varisequalto=&killcount 11:activateifused=1,sound=$0,state=1
Notice how the only thing that changes is the killcount variable condition.
Then you put some basic waypoints which the zombies will follow to each hole/entry point in your bunker/whatever and rename the characters according to the wave they fall into.
Example : If you have 4 zombies in wave 1 , put 4 zombies in the map editor and edit their names to t1.Then put Spawn at start to NO and lower their speed(optional).
A basic layout should be like this :
There's no need to divide the waypoints at each entry point into 2.I only did that to add some variety of movement.An important note is to place each wave's characters over or near the same waypoint the other waves use.For example the t1 zombies are first in line at each waypoint.t2 (wave 2) are second and so on.
NOW FOR A VERY IMPORTANT PART! After each zombie kill the zombie kill count has to be raised by 1 and add 100$ or any prefered value to the player's money in order to allow him to buy weapons off walls. This is achieved by adding 1 simple line to each zombie's destroy script.Now since I don't have bond's permission to release his scripts,I'll write the line and explain how to add it.This only concerns the Zombie Apocalypse pack.
On the first line where it says :state=0:setframe=97,state=11 , add this infront of setframe=97 :
rpg_addvar=killcount 1,rpg_addvar=money 100
, so it would look like this :
:state=0:rpg_addvar=killcount 1,rpg_addvar=money 100,setframe=97,state=11
This should be put in the scripts
zombie1destroy.fpi,zombie2destroy.fpi,zombie3destroy.fpi and zombie4destroy.fpi
What this does is add +1 to total zombie kill count and 100$ to player's money.
Now the question is , how do you make weapon's require money to be used.Simple : all they need is an edit in their main script when placed as entities.This is the script that should be used :
;Artificial Intelligence Script
;Header
desc = Weapon Pickup
;Triggers
:state=0,rpg_varisgreaterthan=&money 500:state=10
:state=0,rpg_varislessthan=&money 500,plrdistwithin=40:fpgcrawtextsize=18,fpgcrawtextfont=arial,fpgcrawtextr=200,fpgcrawtextg=200,fpgcrawtextb=200,fpgcrawtextx=50,fpgcrawtexty=70,fpgcrawtext=You don't have enough money.Cost - 500$
:state=10,plrdistwithin=40:fpgcrawtextsize=18,fpgcrawtextfont=arial,fpgcrawtextr=200,fpgcrawtextg=200,fpgcrawtextb=200,fpgcrawtextx=50,fpgcrawtexty=70,fpgcrawtext=Cost - 500$ - Press [F] to pick up weapon
:state=10,plrdistwithin=40,scancodekeypressed=33:rpg_subvar=money 500,state=1,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
;End of Script
EDIT 1 - Here's a revised script for the weapon pickup which uses hud images,instead of fpgcrawtext.It will be included in the demo,which will be up'd soon.
;Artificial Intelligence Script
;Header
desc = Weapon Pickup
;Triggers
:state=0:hudreset,hudx=50,hudy=80,hudimage=gamecore\huds\Gencheff\cost500.jpg,hudname=cost500,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=80,hudimage=gamecore\huds\Gencheff\purchase500.jpg,hudname=purchase500,hudhide=1,hudmake=display,state=1
:state=1,rpg_varisgreaterthan=&money 500:state=10
:state=1,rpg_varislessthan=&money 500,plrdistwithin=40:hudshow=cost500,hudunshow=purchase500
:state=1,rpg_varislessthan=&money 500,plrdistfurther=40:hudunshow=cost500,hudunshow=purchase500
:state=10,plrdistwithin=40:hudshow=purchase500
:state=10,plrdistfurther=40:hudunshow=purchase500
:state=10,rpg_varislessthan=&money 500:state=1
:state=10,plrdistwithin=40,scancodekeypressed=33:hudunshow=purchase500,rpg_subvar=money 500,state=0,playertake,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt
;End of Script
I have made 5 versions of these with different values,but I'd figure you guys know how to edit this one.By default it requires 500$ to buy a weapon , or equivalent of 5 zombie kills.
So What's left?
A lot of things actually.However I have only yet started to make them.
One thing which is crucial though is a small edit in the zombies main scripts.The thing is bond's zombies will react when shot and start following you and that could easily trick to bump into walls.To fix that you could use Dark AI,but I'd rather use a different method.
What we have to do is make the zombies finish following the waypoints which will end just at the beginning of the bunker where the player hides.So basically we place them in a closed environment and then let them roam around for you.First of all remove the line of the zombie's main script which makes them go back to their starting waypoint : :waypointstate=5:animate=2,waypointreverse -
this has to be deleted.
Then what's under ;DETECT PLAYER has to be changed from
:state=0,plrdistwithin=300,plrcanbeseen:waypointstop,state=9,rotatetoplr,setframe=96,sound=x
:state=0,shotdamage=1:waypointstop,state=9,rotatetoplr,setframe=96
to
:state=0,waypointstate=5,plrcanbeseen:waypointstop,state=9,rotatetoplr,setframe=96,sound=x
That's it.This is an edit for zombie apocalypse's zombie1.fpi script.Same goes for zombie2.fpi,zombie3.fpi and zombie4.fpi
In the end you should be able to get something similar or better than this :
Once I get the barrier scripts working , I'll post them as well.
Remember this is for RPG Mod , but it could easily be changed for Project Blue