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 / Timer Script I Made

Author
Message
AzGamer
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location:
Posted: 9th Dec 2008 18:26
Hey everyobdy! I just made this script, it is made to keep an object active for X seconds. So in theory you should be able to keep a door open for a certain a mount of time... and can someone please test it? i am unable to use FPSC right now...

Here it is! Just substitute the " " with a timer (1000= 1 second)
**Note: i purposfully made this script for switches and triggers!

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Dec 2008 21:35
"activated" is not an action. Activation actions are "activate" (For the entity using the script), "activatetarget" (For the entity's target), and "activateifused" (For the entity's IfUsed entity)


So, what exactly does this do? I see that it's supposed to run a timer when it gets activated, and then apparently deactivate itslef after a certain amount of time....

But what purpose does this serve? All of this will be invisible to the player.


Perhaps include instructions on how to implement this into an existing script, such as a door?


The one and only,


AzGamer
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location:
Posted: 9th Dec 2008 23:24
Then how about if i change the code to look like this? Then will it work?



If it does... this is the first real piece of code i've created!
AzGamer
15
Years of Service
User Offline
Joined: 5th Dec 2008
Location:
Posted: 10th Dec 2008 18:08
Sorry for the double post, but any clues on how i could implement this into a door script? I would most likely use it on a remote door. The purpose of this script is to set a timer for how long a door stays open, which means the player only has a certain amount of time to get through it.

Plus i think i foigured out how i could do this:


Then i could just set the if used property in a trigger zone or switch for the door, which then follows the script to open and start a timer, that when it reaches X, it will auto close.

Man i am a noob at scripting ...

Login to post a reply

Server time is: 2024-11-24 17:05:11
Your offset time is: 2024-11-24 17:05:11