Essentially all survival has is a few variables and trigger zones used to spawn enemies when those variable criteria's are met.
I used conjured cash system script and modified it for Survival.
;FPSC Artificial Intelligence Script v118
;Created by Brian Woodward DBA Conjured Entertainment
;Creation 2011/06/10 YYYY/MM/DD
;Modified by Burger
;14/7/12
desc = New Conjured Cash System
;Triggers
:state=0:dimvar=kills
:state=0:dimvar=points
:state=0:dimvar=totalpoints
:state=0:dimvar=jaws1kills
:state=0:dimvar=jaws2kills
:state=0:dimvar=jaws3kills
:state=0:dimvar=spiky1kills
:state=0:dimvar=spiky2kills
:state=0:dimvar=spiky3kills
:state=0:dimvar=gren1kills
:state=0:dimvar=gren2kills
:state=0:dimvar=gren3kills
:state=0:dimvar=grentough1kills
:state=0:dimvar=grentough2kills
:state=0:dimvar=grentough3kills
:state=0:hudreset,hudx=16,hudy=11,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.dds,hudtype=6,huduservar=kills,hudmake=numeric
:state=0:hudreset,hudx=16,hudy=17,hudsizex=16,hudsizey=16,hudimage=gamecore\huds\numeric1.dds,hudtype=6,huduservar=points,hudmake=numeric
:state=0:hudshow=kills,hudshow=points,state=1
;End of Script
In that list, some of those variables aren't really required, but I have them in to make the game better. The numbers of the Jaws1, Jaws2, Jaws3 kills variables refer to the level of difficulty of that set of enemies. Jaws3 is tougher than Jaws1. The reason the enemies have individual variables is so that by killing more jaws you spawn the harder jaws, and so on.
This is a script to activate Jaws1 at 15 kills. Bearing in mind there are 4 Jaws1's.
:state=0:state=1
:state=1,varequal=kills 15:state=2
:state=2:activateifused=1
This is a script to activate the Grendels at 35 kills, similar to the previous script.
:state=0:state=1
:state=1,varequal=kills 35:state=2
:state=2:activateifused=1
And this is where the more difficult enemies come in of the same kind. The issue I had was that I couldn't spawn more difficult enemies when the weaker ones could still be out, 1. because that would result in too many enemies and 2. because the spawns falls out of order, I'm looking for increasing difficulty.
So I made it so that every time you killed a weak Grendel it increased the variable specific to activating the tougher Grendel.
:state=0:state=1
:state=1,vargreater=kills 45,varequal=gren1kills 3:state=2
:state=1,varequal=kills 45,varequal=gren1kills 3:state=2
:state=1,varless=kills 45,varequal=gren1kills 3:state=0
:state=2:activateifused=1
This script means that if kills is equal to 45 or above and you have killed any weak grendel 3 times only then will the tougher grendel be spawned. And because each weak Grendel only had 3 spawns, you wont have a mix.
The weapon scripts are again based off of conjured's cash system weapon pick up scripts. They are almost the same really.
;Artificial Intelligence Script
;Header
desc = Weapon Pickup
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupaweapon.tga,hudname=weaponprompt,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\huds\buyg22.png,hudname=buyweaponpromptg,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=buyweaponpromptg,state=5
:state=10,plrdistfurther=60:hudunshow=buyweaponpromptg,state=15
:state=15:state=10
:state=5,varequal=points 500,scancodekeypressed=33:state=1
:state=5,varless=points 500,scancodekeypressed=33:state=10,plrsound=audiobank\error.wav
:state=5,vargreater=points 500,scancodekeypressed=33:state=1
:state=5,plrdistfurther=60:hudunshow=buyweaponpromptg,state=10
:state=1:subvar=points 500,playertake,hudunshow=buyweaponpromptg,coloff,rundecal=-1,plrsound=audiobank\items\pickupweapon.wav,hudshow=weaponprompt,hudfadeout=weaponprompt,state=10
;End of Script
So all those triggerzones you see are largely small scripts to spawn enemies when the conditions are met.
I'm curious as to people opinions about the limb detection problem I have, I'd be interested to hear your feedback.
"I'm inspired by my own wise quotes, thank you." - Burger, 6/7/12