Here's how you do it...
(1) Save this
;Artificial Intelligence Script
;Conjured Door Question
desc = open up
;Triggers
:state=0:hudreset,hudx=30,hudy=30,hudimage=gamecore\huds\conjured\question.jpg,hudname=do
orq,hudhide=1,hudmake=display,state=1
:state=1,plrwithinzone=1:hudshow=doorq,state=2
:state=2,scancodekeypressed=30:state=3
:state=2,scancodekeypressed=48:state=4
:state=2,scancodekeypressed=46:state=4
:state=2,scancodekeypressed=32:state=4
:state=3:hudunshow=doorq,activateifused=1,plraddhealth=100,state=5
:state=4:hudunshow=doorq,plraddhealth=-50,sound=gamecore\guns\scifi\blaster\fire.wav,stat
e=5
:state=5,plrwithinzone=0:activateifused=0,state=1
;End of Script
as a
FPI file.
(2) Place a
Remote Door in your map and rename it to something unique.
(3) Place a
Trigger Zone in front of the door.
(4) Put the door's unique name in the IFUSED attribute of the Trigger Zone.
(5) Set the FPI (the script above) to the Trigger Zone's AI MAIN.
(6) Create your HUD's image (the question's graphic) and place it in a unique folder. Notice I used the path
gamecore\huds\conjured\question.jpg in the above script example. The path is really ...
languagebank\english\gamecore\huds\conjured\question.jpg but you don't need to put the languagebank\english part in the path in the script. Just remember to put your image in the right place.
(7) Make sure you edit the script to point to your image's path.
(8) Edit the health values if need be too, before you save the final version of the script.
(9) Try it, and have fun!
P.S.
The script uses the letter 'A' for the correct answer.
You can edit that too in the state=2 part of the code.
:state=2,scancodekeypressed=30:state=3
:state=2,scancodekeypressed=48:state=4
:state=2,scancodekeypressed=46:state=4
:state=2,scancodekeypressed=32:state=4
They are listed in order A,B,C,D so just make the state=3 for the correct one and the rest state=4.