Author Topic: Condition Help Needed for Event  (Read 1538 times)

JimG

  • Newbie
  • *
  • Posts: 27
    • View Profile
Condition Help Needed for Event
« on: February 13, 2012, 01:30:12 PM »
I want to set a condition for an event to play a sound when any player goes out and they are not the first out, nor are they out on the bubble or in the money.  I tried several variations of the following with no luck. I use TD3, and would appreciate any help.

isround && (state=2) && (playersLeft = ((buyins - 2) && (!intheMoney+1)))

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5428
    • View Profile
Re: Condition Help Needed for Event
« Reply #1 on: February 13, 2012, 01:36:23 PM »
Trigger: A player busts-out
Conditions: (rank > (inTheMoneyRank + 1)) and (rank < n)

JimG

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Condition Help Needed for Event
« Reply #2 on: February 13, 2012, 01:53:40 PM »
Thanks... worked great.  I really appreciate the support provided on this forum.

Trash Monkey

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Condition Help Needed for Event
« Reply #3 on: June 01, 2012, 12:07:04 AM »
On this same topic....

I have 5 events to fire when a player busts out of the game all using the same trigger "player busts-out"

1. normal bust out
(message and sound are played, no conditions are set so it will triggerEVERY time a player busts out)

2. Bust out winner
(message and sound are played, Condition is playersLeft = 1)

3. Bust out heads up
(message and sound are played, condition is playersLeft = 2)

4. Bust out final table
(message and sound are played, condition is playersLeft = 9)

The trouble I'm having is that the normal bust out will fire instead of the final table or heads up, but seems to work for the winner.

I think I need condition(s) for the normal bust that would "check" for the other events first or something. *shrug*

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5428
    • View Profile
Re: Condition Help Needed for Event
« Reply #4 on: June 01, 2012, 09:55:56 AM »
Actually, you just need to order them properly.  When checking for a matching event, the TD runs through your events from top to bottom.  Once it finds the first matching event, that event is triggered and it stops looking (since only one event will be triggered at a time).

So, you need to put the most specific events closer to the top, and the least specific closer to the bottom, so that a more specific event is matched first, should the conditions warrant it, and if not, it will make it all the way to the bottom of the list before matching the more general event.

In your case, Event 1 is the most general (least specific), and Events 2, 3, and 4 are actually equally specific.  That means that you simply need to put Event 1 below/after Events 2, 3, and 4.  The order of Events 2, 3, and 4 doesn't matter because they are mutually exclusive, meaning there's no point in any tournament where more than one of those events could fire at the same time.

If you have them in this order:

2. Bust out winner (playersLeft = 1)
3. Bust out heads up (playersLeft = 2)
4. Bust out final table (playersLeft = 9)
1. normal bust out

When the final bust-out occurs, Event 2 will be triggered.  When a bust-out occurs leaving 2 players, Event 2 will not match, and Event 3 will be triggered.  When a bust-out occurs leaving 9 players, Event 2 will not match, Event 3 will not match, and Event 4 will be triggered.  When a bust-out occurs and the number of players remaining after the bust-out is not 1, 2, or 9, none of Events 2, 3, 4 will match, thus they will be skipped and Event 1 will be triggered, because it doesn't care how many players are left.

Trash Monkey

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: Condition Help Needed for Event
« Reply #5 on: June 01, 2012, 12:20:11 PM »
*facepalm*

Thanks Corey!

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Condition Help Needed for Event
« Reply #6 on: June 02, 2012, 09:26:45 AM »
Is there any secrets to reordering events?  It appears that I have to delete earlier events then recreate them by hand to move them to the end.  Am I missing something?  (I am using Version 3.1)

The Meal

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Condition Help Needed for Event
« Reply #7 on: June 02, 2012, 09:45:18 AM »
Hey, guess who just noticed the [Sort Events] button over on the left side of the Events tab? ;)

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5428
    • View Profile
Re: Condition Help Needed for Event
« Reply #8 on: June 02, 2012, 10:04:52 AM »
:)

I probably should have mentioned that, honestly.  There are also context-menu options to move events up and down, but using Sort Events is easiest.