Author Topic: Event help: Play sound all rounds but round 4  (Read 3077 times)

killians

  • Newbie
  • *
  • Posts: 13
    • View Profile
Event help: Play sound all rounds but round 4
« on: March 06, 2012, 11:39:35 PM »
Hello folks,

I could not find the answer via search though there were some close ones. I have a special sound effect I am using for round four which is when my rebuys end. I want to use another sound for the end of the rest of the rounds. Anybody know how I can set this up without creating individual events for each of the other rounds?

Thanks.

Ryan

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #1 on: March 07, 2012, 05:59:59 AM »
http://www.thetournamentdirector.net/forums/index.php?topic=2293.msg12457#msg12457

Check out "correlated announcements REBUYS level4.tst "

That will answer your questions.  Note the "Last 3 Hands in 2 minutes" Level 4 event is set higher up than the normal "Increase in 2 Minutes" which gives it priority to fire on level 4 instead of the other event.

Regards
Stuart
Stuart Murray

killians

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #2 on: March 07, 2012, 12:31:33 PM »
Anyway to incorporate that for a version 2 license owner?

Ryan

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #3 on: March 07, 2012, 12:34:38 PM »
Create a new event

Trigger: The Clock Ticks
Conditions: (isRound) and (state = 2) and (roundNum = 4) and (secondsLeft = xx)

(Where xx is the seconds remaining in the round at which time you want the event to fire from 0-infinity seconds

Make sure you put this event above the other one to give it priority

Regards
Stu
Stuart Murray

killians

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #4 on: March 07, 2012, 12:44:41 PM »
Thanks. So if I put it first, the other one won't fire? Also, what does the "state=2" function do? I'm pretty green at this stuff. Thanks for your help.

Ryan

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #5 on: March 07, 2012, 02:16:32 PM »
The state variable has TD look at what condition the current tournament is in. There's a "pretournament", "tournament in progress", "tournament ended", and if I'm not mistaken, "pretournament countdown". State=2 basically means that it's "in progress"
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: Event help: Play sound all rounds but round 4
« Reply #6 on: March 07, 2012, 04:36:41 PM »
isRound = is a round
not isRound = break

state = 0 before tournament
state = 1 in countdown
state = 2 during tournament
state = 3 tournament complete

Stuart Murray

killians

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #7 on: March 08, 2012, 10:35:19 PM »
I think I've almost got this entirely figured out. Thanks to your help I was able to configure two separate events to fire two consecutive sounds for the ending of Round 4 using:
(isRound) and (state = 2) and (roundNum = 4) and (secondsLeft = 93)
AND
(isRound) and (state = 2) and (roundNum = 4) and (secondsLeft = 90)
respectively.

However, my end of round countdown for all other rounds is now not firing anymore (it was firing in the middle of the other countdown previously, but I fixed that. My non-Round 3  countdown consists of three separate events that look like this:
(secondsLeft = 35) and (not isRound = 4)
AND
(secondsLeft = 32) and (not isRound = 4)
AND
(secondsLeft = 2) and (not isRound = 4)
respectively.

Can someone see what the problem might be. The special Round 4 events have been placed about the general round events. Could that also be a problem?

Ryan

Magic_fubu

  • Hero Member
  • *****
  • Posts: 1035
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #8 on: March 08, 2012, 11:40:21 PM »
Quote
(secondsLeft = 35) and (not isRound = 4)
AND
(secondsLeft = 32) and (not isRound = 4)
AND
(secondsLeft = 2) and (not isRound = 4)
respectively.

Assuming that you're looking for three events to fire with 35, 32, and 2 seconds remaining, change the AND to OR. As it is right now, it needs to be with 35 sec left AND 32 sec left AND 2 sec left, which will never happen.

EDIT: the not isRound means that it's looking for a break, where the break number is four, if I'm not mistaken. It may need to be more like this:  not (isRound=4)
Disclaimer - I'm not a big on configuring events, so this may not work. Pretty sure, though, that if I am wrong, that Stuart can fix me
« Last Edit: March 08, 2012, 11:43:49 PM by Magic_fubu »
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: Event help: Play sound all rounds but round 4
« Reply #9 on: March 09, 2012, 06:17:44 AM »
EDIT: the not isRound means that it's looking for a break, where the break number is four, if I'm not mistaken. It may need to be more like this:  not (isRound=4)

Magic is correct, the not isRound is a simple true or false test if it's a round or a break so not isRound = 4 has no relevance.  not (isRound=4) = probably more like (not roundNum = 4) i'm not sure on that one so I have built the conditions you want slightly differently as below.

EDIT: not roundNum = 4 is a ça ne marche pas, just tested it without success.

Right, so your second event that you don't want to fire on round 4 should look like this:

Trigger: The Clock Ticks
Conditions:
(state = 2) and (isRound) and ((roundNum < 4) or (roundNum > 4)) and (secondsLeft = 35) or (state = 2) and (isRound) and ((roundNum < 4) or (roundNum > 4)) and (secondsLeft = 32) or (state = 2) and (isRound) and ((roundNum < 4) or (roundNum > 4)) and (secondsLeft = 2)


EDIT:  Tested this out and the Warning Sound fires at 35, 32 and 2 seconds in all but level 4.  Note there is a seperate condition for each secondsLeft you specified, which are seperated by the 'OR' between state and secondsLeft

State = 2 (during tournament)
isRound (is a round (not a break))
roundNum > 4 (round number is greater than 4 (< less than 4))

Note the double brackets to give different variables to one specific condition

Regards
Stu
« Last Edit: March 09, 2012, 06:53:49 AM by Stuart Murray »
Stuart Murray

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #10 on: March 09, 2012, 10:54:11 AM »
not isRound = 4 will not error, but will not give the results you want.  Due to operator precedence, this equates to (not isRound) = 4, and will always evaluate to false.
not (isRound = 4) will work.  However, it probably is not the best way to express it.

isRound != 4 is what you want.  != means "does not equal".

Stuart, yours may work (I didn't look too closely or test it), but you probably would want to add some parentheses in order to make sure it is evaluated in the same way you intended:

((state = 2) and (isRound) and ((roundNum < 4) or (roundNum > 4)) and (secondsLeft = 35)) or ((state = 2) and (isRound) and ((roundNum < 4) or (roundNum > 4)) and (secondsLeft = 32)) or ((state = 2) and (isRound) and ((roundNum < 4) or (roundNum > 4)) and (secondsLeft = 2))

Or, more concisely:

(state = 2) and isRound and (roundNum != 4) and ((secondsLeft = 35) or (secondsLeft  = 32) or (secondsLeft = 2))

killians

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #11 on: March 09, 2012, 12:10:16 PM »
Thanks again guys. I'll fiddle around with those ideas this weekend.

Ryan

killians

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Event help: Play sound all rounds but round 4
« Reply #12 on: March 10, 2012, 10:19:35 AM »
Thanks gang. It is all testing out perfectly now.

Ryan