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 / Pause Timer?

Author
Message
Yearcut
User Banned
Posted: 8th Dec 2009 14:02 Edited at: 8th Dec 2009 15:47
Hi all,

The level i am making have limited time to kill enemies.

So, i am using several huds to display a timer and using an global timer in trigger zone to count to 5 minutes and if it reaches 5 minutes kill the player.

But when player pause the game using ESC key, the timer hud stops but the internal (global timer) timer is still going on, and then when the player resumes the game it instantly shows Game Over screen.
This means that the timer is still counts while in pause game (ESC).

Is it possible to fix it?

Please help me.

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 9th Dec 2009 09:47
That is a problem.... and I'm sorry to say that I can't think of a proper workaround to it for any version of FPSC (vanilla or modded)

The best fix for this would be a source change, having it "offset" the timers when the game is paused. Since the script timers are based upon the DBP language "timer()", it is not possible to pause it. A "pause" for the script timers would simply change their values the same amount the actual timer changed within the last loop, so that they stay the same distance from the internal timer.

There... that's the way to do it, so if a modder is reading this they can go do it themselves.


The one and only,


Yearcut
User Banned
Posted: 9th Dec 2009 11:58
Quote: "if a modder is reading this they can go do it themselves."


You r a modder.

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 9th Dec 2009 12:09
Wow you are counting down from 5 minutes? with huds wow thats gotto be a lots of codes...








-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
Yearcut
User Banned
Posted: 9th Dec 2009 12:25
Quote: "Wow you are counting down from 5 minutes? with huds wow thats gotto be a lots of codes...


"


Yes, its the longest script i ever wrote in my whole life. lol.

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999
The Master Dinasty
16
Years of Service
User Offline
Joined: 14th Sep 2008
Location: Valhalla
Posted: 9th Dec 2009 12:29
Quote: "Yes, its the longest script i ever wrote in my whole life. lol.
"

tried one with 30 seconds it was my longest script(actully it was my first lol)




-Massap2

Beacause massa is the master!
Staring blankly at the sun waiting for my time to come...
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 11th Dec 2009 10:08
Quote: "You r a modder."


I barely have enough time to pop in and answer random questions. Be thankful.


The one and only,


Yearcut
User Banned
Posted: 11th Dec 2009 10:40
Quote: "I barely have enough time to pop in and answer random questions. Be thankful. "


Thankyou very much sir. Without you, completing my game is impossible.

-YearCut

Your signature has been erased by a mod. please make it no larger than 9999999 x 9999999

Login to post a reply

Server time is: 2024-11-25 05:45:31
Your offset time is: 2024-11-25 05:45:31