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 system

Author
Message
rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 20th Jun 2009 15:44
I have blue mod, and now i was wondering: is it possible to have a timer system, and how?

Like 5 minutes, and bam you are dead?

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Marc Steene
FPSC Master
18
Years of Service
User Offline
Joined: 27th Mar 2006
Location: Bahrain
Posted: 20th Jun 2009 16:16
:state=0:timerstart,state=1
:state=1,timergreater=300000:plraddhealth=-999

The current settings will kill the player after 5 minutes. I believe the 'plraddhealth' action is correct, I don't have the list open with me now so I can't be sure.

Migration Discussion Thread: http://forum.thegamecreators.com/?m=forum_view&t=142497&b=21
Piracy Discussion Thread:
http://forum.thegamecreators.com/?m=forum_view&t=142774&b=21
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 20th Jun 2009 16:27
Confimerd. Marc Steene

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 20th Jun 2009 23:26
If you're using Project Blue, I would highly suggest using "etimerstart" and "etimergreater" since this will keep the global timer open for a script that actually needs it.


The one and only,


rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 21st Jun 2009 00:58
Thanks, i'll try it out Very usefull!

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 21st Jun 2009 07:31
Ah yes, etimers, one of the greater additions to Plys mod, since Vanilla FPSC comes with only 1 timer, which is global and therefor is bad if you want multiple things running on a timer

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 21st Jun 2009 09:20
I can't take full credit for the idea. Empty was the first to do it, but his Mod was only for V1.0 of FPSC. I simply took it along since it had GREAT potential.


The one and only,


Thraxas
Retired Moderator
18
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 21st Jun 2009 10:28
Quote: "Empty was the first to do it, but his Mod was only for V1.0 of FPSC."


Good old Empty's mod. I remember when it was the bees knees in terms of FPSC

The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 21st Jun 2009 12:19
does Vanilla FPSC 1.15 include the possibility to have a hud showing the time running when using the timer script?

In case you find my grammar and spelling weird ---> native German speaker ^^
rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 21st Jun 2009 14:32 Edited at: 21st Jun 2009 16:50
Is it btw possible to let the countdown show up on the screen, so just the number going down?

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 21st Jun 2009 19:47
Its possible in Vanilla, but really tedious, and due to the 100 line cap it would be a pain in the butt having to switch between multiple scripts To get a full timer, and then you'd have to make a bunch of huds, and overall not fun, much easier with Ply's

I tried empty's for allies, it was alright. I didnt know how to script, so I couldnt have taken full use of it. Was there ever a thread on empty's?

rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 21st Jun 2009 19:50
I have Ply's (Blue UMD) So it would be easy then?

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Jun 2009 20:47 Edited at: 21st Jun 2009 20:52
Quote: "since Vanilla FPSC comes with only 1 timer, which is global and therefor is bad if you want multiple things running on a timer"

It's not so bad when you want to do whole seconds or longer intervals like his 5 minute request.

I made a multiple timer system for the stock (vanilla) FPSC engine (v109+) using the variables in v109.

It simply uses the global timer to increment separate variables each second.

So, you can then use the variables as separate timers by setting any variable to 0 as a way to timerstart that timer and then checking the value to count the seconds that have elapsed.

You can find it in The FPSC Scripts List sticky, or just click here.

So, with all you guys calling the stock engine 'Vanilla'...
Why isn't there a 'Chocolate' Mod yet?
Maybe you guys could call one of those new v115 mods, that have merged all the others, the "Chocolate FPSC".

rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 21st Jun 2009 20:59
But i have 1.15 and Blue Mod

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Jun 2009 21:02 Edited at: 21st Jun 2009 21:07
Quote: "But i have 1.15 and Blue Mod"

I know, but others were talking/asking about stuff for the stock engine too. (v115 is higher than v109 so it will work)

With a title as simple as "Timer System" you are going to get stock users looking at the thread too, which is evident.

Besides, this stock version should work with any mod as long as the mod did not do away with the global timer or stock variable system.

rakker126
16
Years of Service
User Offline
Joined: 12th Sep 2008
Location:
Posted: 21st Jun 2009 23:23
Yeah, but i asked for the mod way

Now in the W.I.P. forum: operation sunlight
http://forum.thegamecreators.com/?m=forum_view&t=149451&b=25
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd Jun 2009 20:03
The Mod way is simple:

Use "etimerstart" and "etimergreater". That will use the entity's timer and not the global timer. The only time I see the global timer being of benefit is if you have one script starting the timer and a few others waiting on it. Outside of that, you really have unlimited timers this way because each entity has it's own timer to use.
It's not anything really hard. Just use them in the same way you would use the normal timer.


The one and only,


Login to post a reply

Server time is: 2024-11-25 03:54:41
Your offset time is: 2024-11-25 03:54:41