Posted: 2nd Aug 2007 14:33
Edited at: 3rd Aug 2007 09:55
I am kind of new to FPS, but I wanted to create the perfect elevator. So far I got this far.......
press a switch
door opens
get in elevator
door closes(auto)
get to the top
door opens(auto)
get out of elevator
door closes(auto)
I just need to call the elevator lift to the floor I'm on.
Ok, this script I used for the switch....
____________________________________________________________
;Artificial Intelligence Script
;Header
desc = Switch Activate And Deactivate Within 5 Seconds
;Triggers
:state=0:hudreset,hudx=50,hudy=90,hudimagefine=gamecore\text\pressentertouse.tga,hudname=useswitchprompt,hudhide=1,hudmake=display,state=10
:plrdistwithin=50:hudshow=useswitchprompt,hudfadeout=useswitchprompt
:state=10,plrdistwithin=50,plrusingaction=1:state=1,plrsound=$0,activateifused=1,alttexture=1
:state=1,plrusingaction=0:timerstart,state=2
:state=2,timergreater=5000:state=3,plrsound=$1,activateifused=0,alttexture=0
:state=3,plrusingaction=0:state=10
;End of Script
___________________________________________________________________
Then I used this script for the door....
___________________________________________________________
;Artificial Intelligence Script
;Header
desc = Remote Controlled Door Open(Auto Close In 8 Secs)
;Triggers
:state=0,activated=1:state=1,timerstart,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff
:state=2,timergreater=8000:state=3,sound=$1,colon
:state=3:decframe=0
:state=3,frameatstart=0:state=0,setframe=0
;End of Script
________________________________________________________________
Properly connect the switch to the door by placing the door name into the "IF USED"
press switch
door opens
5 secs later, switch deactivates/resets
8 secs from first press, door closes
NOTE--If you don't use the deactivate switch script, door just opens/closes many, many, many times!
Then I used two trigger zones; one inside the elevator on the bottom floor, and the second in the elevator on the top floor.
This is the script I used for the trigger zones..........
_______________________________________________________
;Artificial Intelligence Script
;Header
desc = Plr In Zone, activate entity specified in IF USED
;Triggers
:state=0,plrwithinzone=1:activateifused=1,state=1
:state=1,plrwithinzone=0:timerstart,state=2
:state=2,timergreater=5000:state=3,activateifused=0
:state=3,plrwithinzone=0:state=0
;End of Script
___________________________________________________________________
Make sure that you connect the zones to the proper door by placing the door name into the "IF USED" box
when player enters zone
door opens(auto)
when player exits zone
door closes(auto)
**NOTE** You are connecting the switch and the zone to the door