Quote: "
:state=0:plrdistwithin=40,hudreset,hudx=50,hudy=50,hudsizey=786,hudimagefine=[huddirectory],hudname=hud,hudmake=display,hudshsow=hud,state=1
:plrdistfurther=40:hudunshow=hud,state=0
"
You shouldn't loop the state that creates the hud.
You only need to create it once.
Also...
:state=0:plrdistwithin=40,
That condition is on the wrong side of the colon.
First Company Veteran used much cleaner code.
But his state=2 has an error...
:state=0:hudreset,hudx=50,hudy=50,hudsizey=786,hudimagefine=[huddirectory],hudname=hud,hudmake=display,hudhide=hud,state=1
:state=1,plrdistwithin=40,state=2
:state=2
,hudshow=hud,state=3
:state=3,plrdistfurther=40,hudhide=hud,state=0
...that semicolon should be a colon.
And even though he created the hud in a separate state he still looped it.
Here is a script that will do it, which you can find in the Official FPSC Guide by Nickydude...
;Objectives on Screen Script
; Script by: Silent Thunder
; Edited by Conjured Entertainment
desc = Display Objectives via TAB key
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore/huds/objectives.tga,hudname=objectives,hudhide=1,hudmake=display,state=1
:state=1,scancodekeypressed=15:state=2
:state=1:hudunshow=objectives
:state=2:hudshow=objectives,state=1
;End of Script
You would supply your own image for
objectives.tga
The script above uses the Tab key to display your message.
The script below is modified to work with zones...
;Artificial Intelligence Script
;Conjured Objectives
desc = Display Objectives Within Zone
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore/huds/objectives.tga,hudname=objectives,hudhide=1,hudmake=display,state=1
:state=1,plrwithinzone=1:state=2
:state=1:hudunshow=objectives
:state=2:hudshow=objectives,state=1
;End of Script
I haven't tested the last one yet but it should work.