Just came up with a new script and thought we would leave it here for those who would like to use it
This particular script is designed to use a key and a switch. The application is as follows.
:::::::::::::::::
Player sees a switch and walks to it. As he/she tries to use it, it tells the player that they must have a key and as such cannot activate the switch. Once they find the key and return to the switch, it tells the player that they found the key and now they can activate the switch.
:::::::::::::::::
If you try this, let me know what you think.
NOTE: Feel free to delete the instruction comments on the script (but please leave our names there
) Thanks and have fun
(Actual code below, instructions w/code download)
;header
;Created by mister shakes with assistance by cruise mcclarren
desc = switch activated by card key
;triggers
:state=0,plrhaskey=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\nothavecardkey.tga,hudname=cantuseswitchprompt,hudhide=1,hudmake=display,state=1
:state=1,plrdistwithin=50,plrhaskey=0,plrusingaction=1:state=2,hudshow=cantuseswitchprompt,hudfadeout=cantuseswitchprompt
:state=2,plrhaskey=1:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\havecardkey.tga,hudname=canuseswitchprompt,hudhide=1,hudmake=display,state=3
:state=3,plrdistwithin=50,plrhaskey=1:state=4,hudshow=canuseswitchprompt,hudfadeout=canuseswitchprompt
:state=4,plrusingaction=1:plrsound=$0,activateifused=1,alttexture=1,state=5
:state=5,plrusingaction=0:state=0
;end of script
LIFE: "That thing that happens to us when we are too young to die"
~V.J.C. 2003