Author Topic: Wrong sounds firing before a break  (Read 2742 times)

Jaxen

  • Newbie
  • *
  • Posts: 45
    • View Profile
Wrong sounds firing before a break
« on: March 08, 2012, 01:05:15 AM »
Ran my first tournament in a while last weekend, not running 3.1 yet but I think I upgraded to 2.5.12 since the last event.

Is NextIsRound not defined in 2.5.12? I ask because my sound script isn't working like its supposed to. I have a "the blinds are going up" sound that fires at the end of every level, except the level before a break ("We're now on break")

When the conditions for the "We're now on break" sound are
(!NextIsRound) && (state = 2) && (secondsLeft = 0)             (this used to work correctly)
"We're now on break" fires at the end of EVERY level

When it's
(NextIsRound = 0) && (state = 2) && (secondsLeft = 0)
"The blinds are going up" fires at the end of every level, including the one before the break where the other should fire.

It all worked correctly before, what am I doing wrong or what is the correct condition command for the end of a level right before a break?

Oddly enough the sound the fires at the end of the break works correctly .... (!isRound) && (state = 2) && (secondsLeft = 0)

On the event list, "Break is over" is ahead of "begin a break" which is ahead of "level ends"

I've spent 2 hours trying to fix this to no avail. Help?

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Wrong sounds firing before a break
« Reply #1 on: March 08, 2012, 06:48:21 AM »
nestIsRound = 1 (true)
nestIsRound = 0 (false)

are the variables you require for your condition.

Regards
Stuart
Stuart Murray

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Wrong sounds firing before a break
« Reply #2 on: March 08, 2012, 10:11:50 AM »
nextIsRound was added in 3.0.

Since it wasn't in version 2, the variable nextIsRound would evaluate to undefined and probably produce an error in your formula.  !undefined would likely evaluate to true, however.  So,

(!NextIsRound) && (state = 2) && (secondsLeft = 0)

... would evaluate to:

(true) && (true) && (true)

... at the end of every level during a tournament.

Jaxen

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Wrong sounds firing before a break
« Reply #3 on: March 08, 2012, 09:18:47 PM »
nextIsRound was added in 3.0.

Since it wasn't in version 2, the variable nextIsRound would evaluate to undefined and probably produce an error in your formula. 

When I reached the 2-hour mark last night I had that notion, but I could have sworn it worked in the last event of last year.

So is there a solution that doesn't involve "Upgrade to 3.1.1?" (I eventually will, but that's besides the point)

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Wrong sounds firing before a break
« Reply #4 on: March 09, 2012, 11:00:58 AM »
Unfortunately there's no way in version 2 for the conditions to be able to determine whether or not the next level is a round or a break.  To accomplish what you are intending would require creating events specifically for your schedule.  So if your schedule looked like this:

Round 1
Round 2
Break 1
Round 3
Round 4
Break 2
Round 5
Round 6
Break 3
Round 7
Round 8
Break 4

You would have to create an event with conditions like:

isRound and ((roundNum = 2) or (roundNum = 4) or (roundNum = 6) or (roundNum = 8 ))

Or, coincidentally in this example it could be expressed as:

isRound and ((roundNum % 2) = 0)

(In other words, it's a round and it's an even round number (the remainder when the round number is divided by 2 is 0).)

Not too bad, but it's "hardcoded" for your schedule.  Change the schedule and the event conditions might have to change.

Jaxen

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Wrong sounds firing before a break
« Reply #5 on: March 10, 2012, 10:29:32 PM »
You would have to create an event with conditions like:

isRound and ((roundNum = 2) or (roundNum = 4) or (roundNum = 6) or (roundNum = 8 ))

Actually, that wouldn't be too hard too do, or customize to the structure of the event. My question is, do you really need the isRound? If you're specifying a round number, wouldn't it know that it indeed is a round (i.e. not a break)?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Wrong sounds firing before a break
« Reply #6 on: March 11, 2012, 10:16:34 AM »
Yes, you need the isRound variable.  The roundNum variable remains set even during breaks.  So, taking my last example, roundNum would still be set to 2 during Break 1.