Quote: ":state=2,vareless=5:hudunshow=three,hudshow=four,state=3
"
search the error, hint: "e"
varless=5 means 4,3,2,1,0, so every state is true > error.
i dont know how to handle localvars, but i think you have to specify wich var you want to manipulate (as it is done with dimvars), so "varless=1 5" or something like that. but as said i dont know how its done with localvars.
this is just for info, it doesnt make sense for me when think in logical terms.
try to use varequal=x x, that specifies the varcount exactly, should work better for this script.
oh, and its better to define vars and huds in the state=0-line.
i would do it something like this (dont know if its working, cant check):
;Artificial Intelligence
;header
desc = Health pack retrieved
;trigger
:state=0,plrdistwithin=40:state=2,playertake,coloff,plrsound=audiobank\misc\ping.wav
:state=1:rundecal=5,incvar=healthhud 1,state=2
:state=2,vargreater=healthhud 4:playerdrop
:state=2,varless=healthhud 4:state=0
;end of script
;Artificial Intelligence
;header
desc= Displays the HUDS in order or the var values.
;trigger
:state=0:dimvar=healthhud,setvar=healthhud 0
:state=0:hudreset,hudx=86,hudy=91,hudimagefine=gamecore\huds\health\zero.png,hudname=zero,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86,hudy=91,hudimagefine=gamecore\huds\health\one.png,hudname=one,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86,hudy=91,hudimagefine=gamecore\huds\health\two.png,hudname=two,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86,hudy=91,hudimagefine=gamecore\huds\health\three.png,hudname=three,hudhide=1,hudmake=display
:state=0:hudreset,hudx=86,hudy=91,hudimagefine=gamecore\huds\health\four.png,hudname=four,hudhide=1,hudmake=display,state=1
:state=1,varequal=healthhud 0:hudshow=zero,state=2
:state=1,varequal=healthhud 1:hudunshow=zero,hudshow=one,state=2
:state=1,varequal=healthhud 2:hudunshow=one,hudshow=two,state=2
:state=1,varequal=healthhud 3:hudunshow=two,hudshow=three,state=2
:state=1,varequal=healthhud 4:hudunshow=three,hudshow=four,state=2
:state=2,scancodekeypressed=15,vargreater=healthhud 0:decvar=healthhud 1,plraddhealth=25
:state=2:state=1
;end of script
using the 2nd script on a nonstatic,isimobile entity always active anywhere on the map.
justmy2cents