Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / Switch,Door,Elevator -HELP

Author
Message
RiPiG
17
Years of Service
User Offline
Joined: 2nd Aug 2007
Location:
Posted: 2nd Aug 2007 09:08
Ok, I need help with creating some kind of script that when you...

press switch calls elevator to that floor and opens door, get in elevator, door close and when you get up to next level door opens then once out closes by it self.

Someone please help
RiPiG
17
Years of Service
User Offline
Joined: 2nd Aug 2007
Location:
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
xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 2nd Aug 2007 17:21
This is the closest thing you will find until something else comes along.

I'm sorry, my answers are limited. You must ask the right question.

Unknown Truth
19
Years of Service
User Offline
Joined: 16th Feb 2005
Location: Hell
Posted: 2nd Aug 2007 22:05 Edited at: 2nd Aug 2007 22:06
Well I don't think it's possible to call the lift to the floor you're on if you're on a floor between the top and bottom floor but the rest is almost possible. I made a script where you walk up to the switch that opens the door to the elevator, walk in, press the switch on the wall, and then you go to the next floor. You can press the switch again to close the door and keep going. There is only one small problem, I didn't put the next part in (wait 10 seconds to close door) because I didn't think having two timers was possible in FPSC, if it is, I would definately do it. Instead of doing that, it closes when you're too far away or when you press the switch. That's probably as close as it gets...

The truth is still unknown... or is it!
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 3rd Aug 2007 15:11
i was thinking couldnt you make a script like this

scancodekey=???,moveup=50
scancodekey=???,movedown=50

to get the lift moveing but since you cant activete objects vith different names you would have to code the door names into the script
il have a go and post the script and a video

RiPiG
17
Years of Service
User Offline
Joined: 2nd Aug 2007
Location:
Posted: 5th Aug 2007 05:00
-Unknown Truth, can we make a swith script different for each floor to call the elevator? And for the timers, look at the scripts I wrote above, as you see there are 3 timers for each floor, a total of 6 timers I am using.

Login to post a reply

Server time is: 2024-11-23 20:37:54
Your offset time is: 2024-11-23 20:37:54