So I've been working on FPI scripting a little bit and it's definitely making a lot of sense, although I keep getting a weird error with this script.
;Artificial Intelligence Script
;Header
desc = Pickup M-16 for 1500 Points
;Triggers
:plrwithinzone=0,activated=9:activate=0,hudunshow=buyprompt,hudunshow=insufficientfunds,state=2
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore/huds/user/Survival Game Gun Pickup/buym16witheotech.png,hudname=buyprompt,hudhide=1,hudmake=display
:state=0:hudreset,hudx=50,hudy=50,hudimagefine=gamecore/huds/user/Survival Game Gun Pickup/notenoughpointstobuy.png,hudname=insufficientfunds,hudhide=1,hudmake=display,state=2
:state=1:rundecal=5
:state=2,plrdistwithin=30:hudshow=buyprompt
:state=2,plrdistwithin=30:activate=9,state=3
:state=3,varequal=cashcounter 1500:state=5
:state=3,varless=cashcounter 1500:state=4
:state=3,vargreater=cashcounter 1500:state=6
:state=4:hudunshow=buyprompt
:state=4:hudshow=insufficientfunds
:state=4,plrwithinzone=0,activated=9:activate=0,hudunshow=insufficientfunds,state=2
:state=6,scancodekeypressed=18:hudunshow=buyprompt,hudunshow=insufficientfunds,state=10
:state=6,plrwithinzone=0,activated=9:activate=0,hudunshow=buyprompt,hudunshow=insufficientfunds,state=2
:state=10:subvar=cashcounter 1500,playertake,coloff,state=1
;End of Script
In my head, it should work completely fine, but when I run the game and assign this script to the weapon in the level, it just sits on the wall and nothing happens.
AMD FX-6300 Vishera 3.5GHz, Radeon HD 7850 2GB, 8 GB RAM, Win 7 Pro 64 Bit