I am trying to work out a game where you need a particular key for a particular door. I created the individual tga and dds files for each key and door. Then I set each door and key. Then i changed the locked door script todisplay the name for which key youwould need. And when you picked up that key it woudl tell you which one you picked up. However, all my doors are referring to only one key and all my keys are referring to only one key name when picked up. Here is the scripts I am using.
"Baron's Key"
;Artificial Intelligence Script
;Header
desc = Pickup Key
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\BaronsKey.tga,hudname=keyprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=keyprompt,hudfadeout=keyprompt
:state=1:rundecal=5,state=0
;End of Script
"Baron's Door"
;Artificial Intelligence Script
;Header
desc = Key Door (Open 'With Key' and Close)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\Baron's Door.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=keydoorprompt,hudfadeout=keydoorprompt
:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=60:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0
;End of Script
"Gaerzan Key"
;Artificial Intelligence Script
;Header
desc = Pickup Key
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\Gaerzan Key.tga,hudname=keyprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=40:state=1,playertake,coloff,plrsound=audiobank\misc\ping.wav,hudshow=keyprompt,hudfadeout=keyprompt
:state=1:rundecal=5
;End of Script
"Gaerzan Door"
;Artificial Intelligence Script
;Header
desc = Key Door (Open 'With Key' and Close)
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\Gaerzan Door.tga,hudname=keydoorprompt,hudhide=1,hudmake=display,state=10
:state=10,plrdistwithin=60:hudshow=keydoorprompt,hudfadeout=keydoorprompt
:state=10,plrdistwithin=60,plrhaskey=1,plrusingaction=1:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,plrdistfurther=60:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=10,setframe=0
;End of Script
Now this is only two of the scripts. The other keys/doors are the same script with the different tga files for the different keys/doors. Is the problem because the state variable is similar in all scripts? If so, is there a way to change it so that each one works independently of the other ones? I tried resetting the state to 0 but that didn't work. Please help.
LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003