OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Krieg on 16 Jul 2009, 13:32:08

Title: Countdown timer Script/Trigger?
Post by: Krieg on 16 Jul 2009, 13:32:08
Is there a countdown script/trigger/etc. that if there is no time left ends the game using trigger?
Title: Re: Countdown timer Script/Trigger?
Post by: Yasirotta on 16 Jul 2009, 14:42:47
Yes, but what for ?
There is countdown/timeout in triggers, witch counts as seconds. You fill all 3 spaces (min/max/mid) whit same numbers, and it will start countdown when trigger is activated.

Example, you put trigger like "East present" axis 50 x 50
Timeout min 300 max 300 mid 300
Type: End-1

East soldier walks to trigger, and countdown begins. It has been set to 300, witch is 300 seconds what is 5 minutes. After 5 minutes, game will end. This looks crappy, but you can add cutscenes or hints of warnings etc. etc.

What you want to do ?
Title: Re: Countdown timer Script/Trigger?
Post by: Krieg on 18 Jul 2009, 19:06:55
Thank you for response, Yasirotta.

I want to create "Time Bomb" kind of countdown, so player can see how much time is left etc.
Title: Re: Countdown timer Script/Trigger?
Post by: Yasirotta on 18 Jul 2009, 19:41:20
Ok. For timebomb, you can use search in here for timebomb script. Should be few of them.

There can be better ways, but here is one way. First you place trigger, size and activated for what you like. You can put timeout, example 300 to all min/max/mid so its 300 seconds (5minutes) timeout. In activation line, you can type:
Code: [Select]
hint "5 minutes time left... or what you like. You can make also other triggers, where is warning for "4 minutes left..." or "1 minute left...". Most important is, that last trigger what ends mission, is marked for Type: End-1. It can be after bomb exploded or something if you wish.

"hint" is that small screen in up-left corner, witch pop-out whit "ping" sound. You can find also scripts where player can check how much you have time left, or trigger/scripts where hint appears every minute (or something), how much you have time left. You can use also that white text, as called "titletext" what appears in center of screen:
Code: [Select]
titletext "you have 5 minutes left...
PS. I prefer to use hint rather than titletext. It looks much better.
Title: Re: Countdown timer Script/Trigger?
Post by: Gruntage on 25 Jul 2009, 23:33:32
I have a mission that demonstrates EXACTLY how to have a timer in a mission. Just follow the instructions in the script and et-voila! you have a working timer  :D

http://rapidshare.com/files/260021060/timer1.Eden.zip.html (http://rapidshare.com/files/260021060/timer1.Eden.zip.html)

Gruntage