Author Topic: Help with alerting players to breaks  (Read 3205 times)

whirlers

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Help with alerting players to breaks
« on: June 18, 2012, 02:28:46 PM »
Hiya folks

I have setup a tournament with a break set after round 4, 8 & 12
I have a event set alerting the players to the upcoming break around 7 secs at the end of these levels. But for some reason i'm getting the alert at the end of all levels, even the end of the breaks is informing the players there's another break coming lol

What formula do i need to insert to get this working right.
I just need this alert to fire 7 sec's before each of the above rounds end and thats it.
Cheers

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Help with alerting players to breaks
« Reply #1 on: June 18, 2012, 04:09:57 PM »
You need something similar to this in with the configuration of it: next=not(isRound)

I am pretty sure that as I have it, it won't work, but that is close to what you need.
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Help with alerting players to breaks
« Reply #2 on: June 18, 2012, 05:00:30 PM »
Trigger: The Clock Ticks

Conditions: (isRound) and (state = 2) and (secondsLeft = 7) and (nextIsRound = 0)

isRound = Is a round not a break
state = 2 (during tournament)
secondsLeft = self explanatory
nextIsRound = 0 (0 False / 1 True)

Actions: Play Break Announcement etc

Regards
Stu
Stuart Murray

whirlers

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Re: Help with alerting players to breaks
« Reply #3 on: June 18, 2012, 05:47:20 PM »
Cheers for that help, works a treat  :P

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Help with alerting players to breaks
« Reply #4 on: June 18, 2012, 06:34:49 PM »
Thanks Stuart! I'm not much for conditions... Least I was on he right track :)

Trigger: The Clock Ticks

Conditions: (isRound) and (state = 2) and (secondsLeft = 7) and (nextIsRound = 0)

isRound = Is a round not a break
state = 2 (during tournament)
secondsLeft = self explanatory
nextIsRound = 0 (0 False / 1 True)

Actions: Play Break Announcement etc

Regards
Stu
My cowboys shot down your rockets
---
If you send a request to me please send that you got me from here w/your TD name to confirm. Thanks!

Muddguts

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Help with alerting players to breaks
« Reply #5 on: November 01, 2013, 11:04:03 PM »
Sorry all. So new to creating events from scratch. The conditions formula shown in this thread are over my head.

I want my break sound to fire with 10 seconds left in level #3. Rather than showing me the formula, could you let me know what values to put into each box when you click on the "+" button (test conditions), that way I can get the gist of it and be able to use that for future events?

I'm not sure what the difference is between roundNum and level as I thought they were the same thing and I have no idea what isRound means

thanks!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6220
    • View Profile
Re: Help with alerting players to breaks
« Reply #6 on: November 04, 2013, 03:52:38 PM »
Sorry all. So new to creating events from scratch. The conditions formula shown in this thread are over my head.

I want my break sound to fire with 10 seconds left in level #3. Rather than showing me the formula, could you let me know what values to put into each box when you click on the "+" button (test conditions), that way I can get the gist of it and be able to use that for future events?

Every time the trigger occurs, the event will be considered for firing.  The conditions then determine whether or not the event will fire.  If there are no conditions defined, the event will always fire when the trigger occurs.  So, essentially, the conditions are narrowing down the possibility that the event fires.

All of the various input boxes below the conditions input area allow you to specify the various variables that are supplied to the conditions formula.  During the tournament, when the trigger occurs, all of those variables are filled in automatically by the application from the current tournament state.  As an example, the addOnsAllowed variable (I chose this example because it's the first variable alphabetically) will have a value of 1 if add-ons are allowed at this time, or 0 if add-ons are not allowed.  So when the conditions formula is evaluated, the variable addOnsAllowed will automatically be set to 1 or 0, depending on the tournament state.  On the Edit Event dialog, you can set this variable (and all of the others) to whatever value you want to simulate a specific tournament state, and then test your conditions formula.

So, as an example, I edit the event "The Countdown ends", which is included in the SampleEvents.tst template that comes with the software.  The Conditions for that event are:

(state = 1) and (secondsLeft = 0)

The help for the state variable states: A number indicating the state, or stage, of the tournament: 0 indicates the tournament has not started; 1 indicates a pre-tournament countdown; 2 indicates the tournament is currently in progress; 3 indicates the tournament has ended.
The help for the secondsLeft variable states: The number of seconds remaining on the tournament clock.

You can see help by hovering over a variable, or by pressing the Cheat Sheet button.

The above conditions formula basically says: "when a countdown is in progress and there are 0 seconds left on the tournament clock"

I can test this formula, to see its outcome, by changing the values in the state and secondsLeft inputs in the Test Conditions section.  For example, if I enter the value "2" (without the quotes) into the state input and then press the Test button, the state variable will be given a value of 2 and the conditions formula will be evaluated.  The results will appear in the Results field.  A value of TRUE means the event would fire, FALSE means it would not.  In this case, we'd see a value of FALSE since the formula is only going to evaluate to TRUE if state is 1, and we've set it to 2.  During a tournament, state will only have a value of 1 during a countdown, so we can be sure our event will only fire during a countdown.  The second variable, secondsLeft works the same way.  Together, the and operator means that both sides must be true for the whole thing to evaluate to true.

I'm not sure what the difference is between roundNum and level as I thought they were the same thing and I have no idea what isRound means

thanks!

Each entry in the blinds schedule is a level.  A level may be either a Round or a Break.  If the schedule is composed of 3 rounds, followed by a break, followed by 3 more rounds, followed by a break, followed by 3 more rounds, then you have a total of 11 levels: 9 rounds and 2 breaks.  The first round is also the first level.  The second round is the second level and the third round is the third level.  But the 4th level is the first break.  Next is the 4th round, which is the 5th level.  And so on.