Author Topic: Announce Break  (Read 3578 times)

MotoguzziF91

  • Newbie
  • *
  • Posts: 45
    • View Profile
Announce Break
« on: January 26, 2020, 11:32:15 AM »
Can someone help me
 i would like to create an event that will announce at the end of the level before the breaks (5 breaks and 1 dinner break). I already have an event for each level end
Trigger: the clock ticks
Conditions: (state = 2) and (secondsLeft = 6)
Action: Play sound

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Announce Break
« Reply #1 on: January 27, 2020, 12:25:33 PM »
Add in the "nextIsBreak" variable to distinguish between rounds that are just before a break and all the other rounds.

(state = 2) and (secondsLeft = 6) and nextIsBreak

MotoguzziF91

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Announce Break
« Reply #2 on: January 28, 2020, 03:33:16 AM »
I think I did something wrong or didn't understand it. I did it as described above, now the 2 announcements are played together before the breaks

Event 1
Trigger: the clock ticks
Conditions: (state = 2) and (secondsLeft = 6)
Action: Play sound

Event 2
Trigger: the clock ticks
Conditions: (state = 2) and (secondsLeft = 9) and nextIsBreak
Action: Play sound

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Announce Break
« Reply #3 on: January 28, 2020, 09:15:52 AM »
Your two events trigger at a different time, so one will trigger with 9 seconds left and the other will trigger at 6 seconds left.  Event 1 will trigger at the end of every level, whether it is a round or a break.  Event 2 will only trigger at the end of levels where the next level is a break.  If you want Event 1 to trigger only when Event 2 doesn't, you need to restrict it like you did Event 2.

If you change Event 1's conditions to:

(state = 2) and (secondsLeft = 6) and nextIsRound

... then it should only fire at the end of levels where the next level is a round, not a break.

MotoguzziF91

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Announce Break
« Reply #4 on: January 28, 2020, 10:21:06 AM »
Thanks that works,
 I still have a problem, there are 5 short breaks and 1 dinner break and at the dinner break I want a different announcement than the normal breaks, is that possible?

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Announce Break
« Reply #5 on: January 28, 2020, 10:41:06 AM »
You'd have to find a way to distinguish that break from the others.  It sounds like it's different only in the duration, and which break (number) it is.  Using the break number is fine, but if you change your schedule you could break it.  Sounds like the break duration is better.

So, as an example, if your short breaks are 15m each and your dinner break is an hour, you could add a third event with conditions:

(state = 2) and (secondsLeft = 6) and nextIsRound and nextLevelDuration > 15

MotoguzziF91

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Announce Break
« Reply #6 on: January 29, 2020, 06:41:03 AM »
that does not work. i tried the following examples
(state = 2) and (secondsLeft = 12) and nextIsRound and nextLevelDuration > 35  ( Result play Sound ShortBreak)
(state = 2) and (secondsLeft = 12) and nextIsRound and nextLevelDuration > 30   ( Result play Sound ShortBreak)
(state = 2) and (secondsLeft = 12) and nextIsRound and nextLevelDuration > 15  ( Result play Sound ShortBreak)
(state = 2) and (secondsLeft = 12) and nextIsRound and nextLevelDuration > 40  ( Result play Sound ShortBreak)

(state = 2) and (secondsLeft = 12) and nextIsBreak and nextLevelDuration > 35   ( Result play Sound ShortBreak+DinnerBreak together)

I have 5 short breaks of 10 minutes and 1 dinner break of 40 minutes
and the leves are 30 min

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Announce Break
« Reply #7 on: February 07, 2020, 05:30:00 PM »
Looks like I forgot to respond to this.  Are you still having an issue?  If so can you recap the events you have configured and what you're trying for?

MotoguzziF91

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Announce Break
« Reply #8 on: February 09, 2020, 10:24:49 AM »
-I have an event with announcement for the end of the levels
-at the end of the levels before the 5 short breaks (10 min) I have another one.
-now I want another announcement before the dinner break (40 min)
you suggested that i try this example
(state = 2) and (secondsLeft = 6) and nextIsRound and nextLevelDuration> 15
but that doesn't work, we only make the announcement of the short breaks

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Announce Break
« Reply #9 on: February 10, 2020, 06:24:00 PM »
Can you send me a saved tournament with this configuration?  I think it will make solving this easier.