Here's another more complex script, it would be applied to an enemy that is on patrol. It tells them to scan for a target and if found, shout at the target (they shout "Hey! you're not supposed to be in here!"), then run after you, strafe, shoot, reload if required and retreat if hurt.
;AI Script
;Header
desc = Got Target \ Freeze \ Shout \ Run \ Strafe \ Shoot \ Reload \ Retreat When Hurt
;Triggers
:state=0,healthless=100:animate=5,dropmarker,state=4
:state=0:state=1,animate=1,freeze,sound=audiobank\voices\hereyounotsupposed.wav
:state=1,ifweapon=0:reloadweapon,freeze,setframe=6,state=2,sound=audiobank\guns\reload.wav
:state=1,ifweapon=1:state=3
:state=2:incframe=6
:state=2,frameatend=6:state=3
:state=3,random=30:choosestrafe,animate=5,dropmarker,state=4
:state=4,plrcanbeseen:settarget,rotatetoplr,dropmarker
:state=4:movetotarget=1,strafe=40
:state=4,ifweapon=1,plrcanbeseen,random=10:settarget,useweapon,choosestrafe
:state=4,ifweapon=0:state=1
:state=4,reachtarget:animate=1,state=5
:state=4,losetarget=20:animate=1,state=5
:state=5,plrcanbeseen:settarget,choosestrafe,animate=5,state=4
:state=5,plrcannotbeseen:runfpidefault=1
;End of Script
Please understand that scripts are totally optional - i.e. you can modify lots of these parameters from within the the FPSC GUI itself. So you won't ever need to actually understand what is in the script if you don't want to. But for those that do... well, lots of possibilities here.
Cheers,
Rich
"I am not young enough to know everything."
- Oscar Wilde