Author Topic: Random Messages  (Read 1484 times)

Madda

  • Newbie
  • *
  • Posts: 22
    • View Profile
Random Messages
« on: January 04, 2017, 05:43:00 PM »
Hi there,

I am looking to host a home game but with multi games ... I was thinking of just changing the game every 10 hands if I can't achieve what I'm about to ask so no problem if it cant be done.

What I am thinking is it possible to though up a random message in the events every say every 7 minutes. Or even better a random selected time like 7, 10 or 15 minutes.

So if I had 5 pre selected messages which would be the different game types and every 7 minutes the tournament thoughs up one of the random games.

Hope that makes some sense.

Thanks in advance.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Random Messages
« Reply #1 on: January 05, 2017, 11:03:40 AM »
Pretty easy to do, actually.  Well, not the randomly selected time, but at fixed times.

Create a new event.  Set the Trigger to The clock ticks.  Set the Conditions to:

secondsElapsed / 60 = 7

Add Actions that display a message about changing the game, one for each game.  Press the Action Settings button and in the Messages section, select the behavior you want.

This would display one of the messages every 7 minutes during a round.  Change the 7 to the time period you want (5, 7, 10, etc).  It's probably best to make sure your round lengths are an even multiple of the time period you choose.  So if you want to change hands every 7 minutes, your rounds should be 7 minutes long, or 14 minutes long, or 21 minutes long, etc.  Now that I think of it, you might want to make sure the messages don't get displayed at the end of the round (when the clock hits 0, which, if your round length is a multiple of your hand change time, will mean a message would get displayed):

(secondsLeft > 0) and (secondsElapsed / 60 = 7)

You could also do this just by modifying the Rounds schedule.  That might make more sense, actually.  Make each round a change in hands.  You could simply change the Game Name field for each round, but not increase the blinds except for every, say, 5 rounds (if you had 5 different games you want to play).  The default layout already shows the Game Type and Game Name.  Personally, I would probably go this route since the game information is always on screen and not just while an event message flashes on the screen.

Madda

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Random Messages
« Reply #2 on: January 09, 2017, 01:21:48 PM »
Cheers that is absolutely spot on thank you.

I haven't tested it out yet but I can see how it works and sure it will be spot on.

Thanks very much.

Madda

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Random Messages
« Reply #3 on: January 12, 2017, 12:08:32 PM »
Hi Corey,

I had a go at this and it nearly works perfectly how I want it apart from it only happens once per round.

For example if the round is 21 minutes it will flash up randomly at 14 minutes but not again at 7 minutes. But does again at 14 minutes in the next round.

Cheers for the support again in advance

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Random Messages
« Reply #4 on: January 15, 2017, 10:17:24 PM »
Sorry, been on vacation.  Can you attach your Events template?

Madda

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Random Messages
« Reply #5 on: January 16, 2017, 11:32:27 AM »
Its no problem I done a bit of a work around which I am happy with the outcome after testing it.

I just duplicated the events to but changed the minutes at 7 14 and 21

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Random Messages
« Reply #6 on: January 16, 2017, 09:50:40 PM »
Yes, in retrospect it seems I was aiming for 7 minutes exactly, not a multiple of 7.  It should be something more like:

(secondsLeft > 0) and ((secondsElapsed / 60) % 7 = 0)

So, just for reference, "(secondsElapsed / 60)" will give you the number of minutes (fractional) since the level started.  And the "%" operator is called "mod", which means the remainder of division.  So "minutes elapsed mod 7 = 0" means the number of minutes elapsed is evenly divisible by 7.  Which in turn means 7, 14, 21, 28, etc.