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 / Elevator Switch Script Question...

Author
Message
TheDude
14
Years of Service
User Offline
Joined: 8th Feb 2005
Location: Chicago, Illinois
Posted: 19th Nov 2005 04:54
Anybody know if there is a way to make an elevator go down by flipping a switch? I tried, and thought that if I place an elevator (top-platorm going down to base ) and I put a switch in there. I flipped the switch and the elevator doesn't move ( and no, there is nothing in the way ). Am I doing something wrong? I even have the right entity names on the right entities ( 'if used', etc. )

You are talking to THE dude, I am the dude. T.H.E. dude, there's no other dude like me. The dude is a way of life, you just dont understand.
uman
Retired Moderator
14
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 19th Nov 2005 05:32
I have looked at this some time ago and got a switch to activate a lift when I wanted to try and call a lift to a players (level) location.

Its really tricky as FPSC lifts only go up or down not both ways which is rather unrealistic and needs fixing.

The point being is yes it can be done. If I get a mo I may have a look around see if I can find the script. It was just an experiment and I never actually used the script in game, but still have it somewhere in case it proves to be useful.

Give me a little while (24 hrs - some sleep needed zzzz) and I will see what I can do.

uman
Retired Moderator
14
Years of Service
User Offline
Joined: 22nd Oct 2004
Location: UK
Posted: 20th Nov 2005 02:41
OK not sure if this is working or of any help - or what the condition of the code was when I left off working with it - but you could try it and play around with it to see if you can get it working to meet your requirements. - nothing to lose.

Lift Down : Code :
;Artificial Intelligence Script

;Header

desc = Autolift1_Down (move down once, call lift up)

;Triggers
:state=0,activated=1,plrhigher=10,plrdistwithin=50:state=6,coloff
:state=1:moveup=-1
:state=1,raycastup=20 0:state=2
:state=2,plrdistfurther=55,playerassociated:state=3,unassociateplayer,colon
:state=3,activated=0,plrdistfurther=10,activateifused=1:state=4,coloff
:state=4:moveup=1
:state=4,raycastup=20 100:state=5
:state=5,plrdistfurther=55,playerassociated:state=0,unassociateplayer,colon

:state=6,plrdistwithin=50:sound=audiobank\scifi\scenery\lifts\up.wav,state=1,associateplayer
:state=6,plrdistfurther=55,playerassociated:state=0,colon
:state=7,plrdistwithin=50:sound=audiobank\scifi\scenery\lifts\down.wav,state=4,associateplayer
:state=7,plrdistfurther=55,playerassociated:state=3,colon

:activated=1:state=11,activate=0
:state=11,plrhigher=100:state=21
:state=11:state=31
:state=21,raycastup=20 100:state=3
:state=21:state=1
:state=31,raycastup=20 0:state=0
:state=31:state=4

;End of Script

Lift Switch : Code :
;Artificial Intelligence Script

;Header

desc = Instance Switch (activate upon use)

;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=100,plrusingaction=1:state=1,setframe=0,plrsound=$0,activateifused=1
:state=1:incframe=0
:state=1,frameatend=0:state=2
:state=2,plrusingaction=0:state=4
:state=4:decframe=0
:state=4,frameatstart=0:state=5,setframe=0
:state=5:state=10

;End of Script

Good Luck with that

Les Horribres
13
Years of Service
User Offline
Joined: 20th Nov 2005
Location: My Name is... Merry
Posted: 21st Nov 2005 02:40
I think that it might work better to redesign the elevators


:activated=1,plrdistwithin=60:state=5,activate=0
:activated=2,plrdistwithin=60:state=10,activate=0

:state=5:moveup=-1
:state=10:moveup=1

:raycastup=0 100:state=1
:raycastup=0 -20:state=1

and 1 switch activates as 1, the other as 2...
incense
13
Years of Service
User Offline
Joined: 25th Nov 2005
Location:
Posted: 6th Dec 2005 23:58
uman,

What is the name of the file that you have to put the script in to get it to work? And what directory is it in? Please.

Login to post a reply

Server time is: 2019-07-23 08:40:31
Your offset time is: 2019-07-23 08:40:31