;Artificial Intelligence Script
;Header
desc = Pickup Key
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pickedupakey.tga,hudname=keyprompt,hudhide=1,hudmake=display,state=10
:state=0:hudreset..........clears any text image
hudx=50,hudy=90............positions the text image
hudimagefine=gamecore\text\pickedupakey.tga........defines the text image
hudname=keyprompt..........names the HUD
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=keyprompt,hudfadeout=keyprompt
plrdistwithin=40..........when to display the HUD
Experiment with it. Have fun.
Crazy Grandpa