Author Topic: Event  (Read 4706 times)

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Event
« on: June 28, 2017, 10:54:26 AM »
Hi Corey. Can I have an event that will trigger at a certain time (instead of minutes/seconds left in a round). I would like to have a chime play at the top of every hour. The time would be based of the clock in the system tray.
Thanks

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Event
« Reply #1 on: June 28, 2017, 11:37:35 AM »
Of course.  Just use the trigger "the clock ticks" and set the Conditions appropriately.

timeOfDay = 120000

This will fire at noon.  For every hour you could do something like:

timeOfDay = 0 or timeOfDay = 010000 or timeOfDay = 020000 ...

Or more easily:

timeOfDay % 10000 = 0

FYI, % is the "modulo" operator, which means "remainder after division".  So, "timeOfDay divided by 10000 leaves a remainder of 0".

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Event
« Reply #2 on: June 29, 2017, 01:02:43 PM »
Works!
Next, how can I get this to fire if I am in pre-tournament state without a countdown timer running?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Event
« Reply #3 on: June 30, 2017, 02:57:32 PM »
You can't.   :(

It also won't fire if the clock is paused.

This is partially intentional, to keep events from firing while you're not running a tournament.  But in retrospect there are few if any times that would be the case, unless you specifically wanted them to fire outside of your tournament.  Like you do.  I might need to add a "The time-of-day clock ticks" trigger, or something like that.

jodybingo

  • Hero Member
  • *****
  • Posts: 667
    • View Profile
    • Personal Web Site
Re: Event
« Reply #4 on: June 30, 2017, 08:25:43 PM »
 :)