;Artificial Intelegence Script
;Header
desc = Tactical Script
;Triggers
:ifweapon=0:reloadweapon,state=1,animate=31,sound=audiobank\guns\reload.wav
:plrcanbeseen:settarget,rotatetotarget,resethead
:plrdistwithin=155:rotatetoplr,resethead
:state=0,random=50:rotateheadrandom=71
:state=0,shotdamage=5:state=6
:state=0,ifweapon=1,plrcanbeseen:state=3
:state=1,random=45:rotateheadrandom=75
:state=1,random=100:state=0,animate=31
:state=1,plrcanbeseen:state=0,animate=1
:state=5:useweapon,rundecal=6,state=0
:state=4:state=5
:state=3:state=4
:state=2:state=3
:state=7,random=1:state=8
:state=7,random=1:state=10
:state=7:settarget,rotatetotarget,state=1,animate=31
:state=8:state=9,setframe=3
:state=9:incframe=3,strafe=-90,rotatetoplr
:state=9,frameatend=3:state=1,animate=1
:state=10:state=11,setframe=3
:state=11:incframe=3,strafe=90,rotatetoplr
:state=11,frameatend=3:state=1,animate=1
;End of Script
There's my first script. The enemy pops up to shoot, then crouces down. But, I've got a problem: The enemy still fires behind cover, and can fire through it. I want the enemy to stop firing when he crouches.
Just copy the script into NotePad, then save is as tactics.fpi, in the scriptbank/people folder. Please comment, and help me on my problem stated above.