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 / Remote door activates after activation

Author
Message
sps999
17
Years of Service
User Offline
Joined: 23rd Oct 2007
Location: On my Computer
Posted: 13th Jan 2008 05:43 Edited at: 13th Jan 2008 05:45
I have a remote door that I want a sound to be played and at the end of the sound the door would open. This could be achieved doing something like this:

Place the sound in front of the door. ( Sound is eight seconds long) Place a Trigger Zone over the Sound Zone, with Remote Door in the IfUsed Property and plrinzoneactivateused in the main AI and for the door it needs to have a script that waits to be activate, then it starts a timer, the timer goes for 8 seconds (Timergreater=8000) and continue with the rest of the script, the problem is my script doesn't do anything at all (not that good with timers) and also, I would like to make it so once the door is open, it can't close. ( Now that I reread my post I noticed that it's one big run-on sentence, oh well) Could anyone help me with the script?

Thank You

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 13th Jan 2008 06:14
Well... you don't have to go in that kind of a round-about manner of doing this.

How about this? (I'll let you do the source, since you seem to know scripter rather well )

Use the default script for an autodoor, and alter it to say something like:

-If player in openning range, play your sound and start timer
-Once timer reaches 8 seconds, open the door.

It sounds simple enough and it seems like it's what you're looking for. Let me know how it goes.


The one and only,
~PlystirE~

Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!
sps999
17
Years of Service
User Offline
Joined: 23rd Oct 2007
Location: On my Computer
Posted: 13th Jan 2008 14:26
Well, I forgot to mention but I already have a script to do it, but something is wrong with it. (Just like all my other Timer scripts) I just need to know what I do wrong when it comes to timers.

The Code:



Thanks.

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 13th Jan 2008 14:48
Hmmm...
Notice the bold, you put too many colons in
I'd change this:
Quote: ":state=0,activated=1:timerstart
:state=0,activated=1:timergreater=8000:state=1,setframe=0,sound=$0
"


To this:
Quote: ":state=0,activated=1:timerstart,state=1
:state=1,timergreater=8000:state=1,setframe=0,sound=$0"


sps999
17
Years of Service
User Offline
Joined: 23rd Oct 2007
Location: On my Computer
Posted: 13th Jan 2008 15:08
@ Coffee Grunt

It your thing doesn't work, But I know why.


:state=0,activated=1:timerstart,state=1
:state=1,timergreater=8000:state=1,setframe=0,sound=$0
:state=1:incframe=0
:state=1,frameatend=0:state=2,coloff

Look at the bold in the first line, simply it skips to the door opening part before the eight seconds is over. So simply just make a small change of state numbers and you'll come up with this:



Thanks for your help.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 15th Jan 2008 08:14
Well, since you mentioned that you have been having problems with not just this script but with your other "timer scripts" then I would go as far as to say that this is a known issue with the timer:

When scripting with a timer, you must remember that it is a GLOBAL timer. This means that every script is using the same timer, and if one script resets the timer variable (by using "timerstart") then all scripts will have that change as well.


Make sure you aren't trying to use a bunch of timer scripts at the same time, as they can interfere with each other.


The one and only,
~PlystirE~

Urlforce:
Dude, I'd rather be declared a dbpro noob than an fpsc legend any day!

Login to post a reply

Server time is: 2024-11-27 21:44:24
Your offset time is: 2024-11-27 21:44:24