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 / open door with switch, timer closes it

Author
Message
JTheMan
18
Years of Service
User Offline
Joined: 6th Jul 2006
Location:
Posted: 4th Jul 2007 14:52
Tried to search the forums for this, but couldn't find any. Is there a way to make so that, when player opens a door with switch, door opens and few seconds later door closes automatically? I think this can be done with timer, but I'm still pretty new with scripting, so I can't do it. Could someone help?
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 5th Jul 2007 18:03
il have a go il need to use some sort of wait command something like

activated=1,state=1,wait=10,activate=$

mabey this us my first

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
Pus In Boots
19
Years of Service
User Offline
Joined: 5th Nov 2005
Location: S.M.I.L.E. industries
Posted: 5th Jul 2007 23:06
This is about the best script idea I've ever heard.

Please sign here
JTheMan
18
Years of Service
User Offline
Joined: 6th Jul 2006
Location:
Posted: 9th Jul 2007 13:08
The wait -command worked, sort of... When I open a door with a switch, no matter how I change wait -command value, door always closes about 5 secs later. Is there a way around this? (I tried wait=10, wait=10000, and wait=20000, none worked.)
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 9th Jul 2007 18:04
il have a mess around and see if i can fix this

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 9th Jul 2007 22:32
ok iv been reading and i think i have an awnser. use the
TIMERGREATER=X
command this should work

.chris

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
JTheMan
18
Years of Service
User Offline
Joined: 6th Jul 2006
Location:
Posted: 10th Jul 2007 08:39
Quote: "use the
TIMERGREATER=X
command this should work"


Sorry, but haven't used that command before. How do I add this? Do I need that wait -command too?

Thanks!

-J
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 10th Jul 2007 13:20 Edited at: 10th Jul 2007 18:58
TIMEGREATER=x

x= the time (im miliseconds) until the next action in the script takes place like

activated=1,state=1,timegreater=x,activate=$

get what im saying?

p.s im writeing this post at school they have blocked the forum(how dare they) so im useing a proxy bypass website

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
JTheMan
18
Years of Service
User Offline
Joined: 6th Jul 2006
Location:
Posted: 10th Jul 2007 17:24
fata error, have you tried this yourself? I can't get it to work. Don't know what I'm doing wrong. If you have this script, could you post it here?
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 10th Jul 2007 18:47
ok im just finding out which part makes the door move il should have it done in 5 minutes

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 10th Jul 2007 18:54 Edited at: 12th Jul 2007 16:58


ok so which line makes the door close/open?

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 10th Jul 2007 19:02
i have been trying to get this to work but you can only oped and close the door once then it will not work at all so instead of trying to modify the door script il do a much simpler script for the switch

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
TZap
19
Years of Service
User Offline
Joined: 29th Aug 2005
Location:
Posted: 11th Jul 2007 19:15 Edited at: 11th Jul 2007 19:18
Create a version of the switch.fpi script and change the line that starts with state=1 to...

:state=1,plrusingaction=0:timerstart,state=2

Add another state=2 line as shown below...

:state=2,timergreater=10000:state=3,plrsound=$1,activateifused=0,alttexture=0

This will open a remote door for 10 seconds, once the switch is used, and then close it again. The switch will also be reset.
fata error
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 12th Jul 2007 12:04
no thats not what we want im trying to get it so you can

press switch
door opens
x seconds later
door closes

im gonna try to sort this out tonight

http://i205.photobucket.com/albums/bb139/chrishind10/x10.gif
JTheMan
18
Years of Service
User Offline
Joined: 6th Jul 2006
Location:
Posted: 12th Jul 2007 12:39 Edited at: 12th Jul 2007 16:57
Ok, I ffigured it out. You both fata error and TZapp have been very helpful, so here is the script : (It's the one that TZapp suggested, but this one has a line from original switch.fpi, so the switch won't reset.)



Thanks again for your help!
FredP
Retired Moderator
18
Years of Service
User Offline
Joined: 27th Feb 2006
Location: Indiana
Posted: 12th Jul 2007 17:00
Just to let you all know there is no WAIT command in the FPSC scripting language.And be careful when using the timer.If anything else in your game uses a timer as well you could have some problems.

Please have mercy and use the search function.
m man
17
Years of Service
User Offline
Joined: 10th Jan 2007
Location:
Posted: 13th Jul 2007 08:01
sorry to go off topic but fredp you are missing a big party in the fps creator chat.

Login to post a reply

Server time is: 2024-11-23 21:07:35
Your offset time is: 2024-11-23 21:07:35