Home   Help Search Login Register  

Author Topic: CountDownTimer (ACCEPTED)  (Read 6101 times)

0 Members and 1 Guest are viewing this topic.

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
CountDownTimer (ACCEPTED)
« on: 28 Sep 2008, 20:10:04 »
Count down time script which displays a non intrusive dialog with counter.

Features
 * Multiple warnings at your choice of interval.
 * Two formats of time "HH:MM:SS" or  "HH:MM"

 
The script ends when the hozMaxTime is reached.
You can end the script prematurely by setting hoz_timerOn = false
You may wish to wait to load this script after the mission has started.
For example give all other scripts a chance to load before loading hozTimer

Configuration
[[warningFreq],maxTime,displayTime,timeFormat] execvm "hoz_timer\scripts\HozTimer.sqf";
[[120,60,30,10],120,10,"HH:MM:SS"] execvm "hoz_timer\scripts\HozTimer.sqf";

Parameters
 * [warningFreq] In Array format the frequency intervals for reminders. The very last entry the timer will turn red.
 * maxTime       Total time for the counter in seconds.
 * displayTime   Length of time the dialog is displayed for.
 * timeFormat    Choices for the display format. "HH:MM:SS" or "HH:MM"

Current Version is 1

Fixed up the demo mission slightly.
Fixed up some problems with the script ending.

OFPEC Download
« Last Edit: 17 Dec 2008, 20:47:48 by hoz »
Xbox Rocks

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: CountDownTimer (Beta)
« Reply #1 on: 28 Sep 2008, 21:27:33 »
hoz_timer.sqf header inside dialog folder:
Code: [Select]
/*
mando_hint.sqf v1.1
By Mandoble June 2008

Parameters:
   Title text.
   Message text to be parsed as structured text.
   Background color as [R, G, B, A] array.
   If keyboard should be intercepted to repeat last hint when pressing H key or not (true/false)

It also uses mando_hint globals inside so this will interfere with missions using mando_hint script.

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: CountDownTimer (Beta)
« Reply #2 on: 28 Sep 2008, 23:08:59 »
Actually that script isn't used. I forgot to remove it. I'm going to update the readme, but I'll wait for some more testing. Thanks for point that out  :-[
Xbox Rocks

Offline i0n0s

  • Moderator
  • *****
Re: CountDownTimer (Beta)
« Reply #3 on: 28 Sep 2008, 23:43:07 »
What means "displayTime" in the parameters?
Readme is contrary to Init.sqf on the warning frequency.

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: CountDownTimer (Beta)
« Reply #4 on: 28 Sep 2008, 23:54:31 »
It means number of seconds the timer is displayed. Thats why I'm going to rewrite the readme so the parameters are clearer.
Xbox Rocks

Offline i0n0s

  • Moderator
  • *****
Re: CountDownTimer (Beta)
« Reply #5 on: 29 Sep 2008, 00:23:26 »
Ah ok :)

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: CountDownTimer (Beta)
« Reply #6 on: 29 Sep 2008, 00:38:18 »
I updated the top post with the parameters. Ignore the readme.txt for this part for now...  :D

Updated the first post with a new zip.
« Last Edit: 07 Oct 2008, 02:44:42 by hoz »
Xbox Rocks

Offline Supergrunt

  • Members
  • *
Re: CountDownTimer (ACCEPTED)
« Reply #7 on: 17 Dec 2008, 17:51:35 »
with this script how can i check in a trigger if it is ended ?  i tried to have a trigger with condition HOZ_timerOn =false but it then stops the script from running  and if i set it to true the condition is met instantly and the trigger avtivates instantly


Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: CountDownTimer (ACCEPTED)
« Reply #8 on: 17 Dec 2008, 18:02:21 »
In my mission the trigger condition is !HOZ_timerOn

I'm retesting it in my example. give me a few mins.

edit:
In this example I've set the counter to 30 secs, wait the 30 secs and the mission ends.


OFPEC Download
« Last Edit: 20 Aug 2009, 16:27:42 by hoz »
Xbox Rocks

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: CountDownTimer (ACCEPTED)
« Reply #9 on: 17 Dec 2008, 18:28:47 »
Seem to be two different versions of v1 of your script attached to posts in this thread. Can you delete the out of date one please, because I's confuseled?  :scratch:
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Supergrunt

  • Members
  • *
Re: CountDownTimer (ACCEPTED)
« Reply #10 on: 17 Dec 2008, 18:48:53 »
thanks this was exactly what i was looking for

Offline hoz

  • OFPEC Site
  • Administrator
  • *****
Re: CountDownTimer (ACCEPTED)
« Reply #11 on: 17 Dec 2008, 20:51:08 »
I removed the first attachment and pointed to the ED resource. The second attachment was just an example using the released version.
Xbox Rocks

Offline i0n0s

  • Moderator
  • *****
Re: CountDownTimer (ACCEPTED)
« Reply #12 on: 28 Nov 2009, 13:36:38 »
One bug:
HOZ_timeron = false doesn't disable the timer. It only disables the messages.
So if I re enable it, I'll get the messages from the first started counter too.

Offline Dazakiwi

  • Members
  • *
Re: CountDownTimer (ACCEPTED)
« Reply #13 on: 13 Dec 2009, 03:17:54 »
Just a suggestion for any future releases, what about the ability to change it to counting upwards and not down, could be a counter for coop missions where everyone has to complete the mission the most quickest and see how much time it took.

Also so predefined points to choose from, middle uppertop of screen, top left of screen etc

Daza