FAQ  •  Register  •  Login

Round Robin

Moderator: MiRai

<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Thu Apr 28, 2011 6:19 pm

Round Robin

I've searched this forum for an answer to this question and I couldn't find anything close to this.

What I'm trying to accomplish is a round robin of sorts, but multiple steps to be executed before going to the next character in a given target group.

Say you have 2 actions that need to be performed by a group of people in an Action Target Group. Ideally it would work like ->

Keypress 1: Action 1 on Character 1
Keypress 2: Action 2 on Character 1
Keypress 3: Action 1 on Character 2
Keypress 4: Action 2 on Character 2
etc

Is there a way to do this? Currently I had to make each pair of steps for each character I want to execute them in one long Keymap. I'd like to get away from that because I'm taking people in and out of the groups and I would like this sequence to reflect the current members of the group as opposed to being set in stone. Thanks in advance for any help!
<<

Alge

User avatar

League of Extraordinary Multiboxers

Posts: 1223

Joined: Wed Jan 26, 2011 2:17 am

Location: Under the milky way tonight

Post Thu Apr 28, 2011 10:32 pm

Re: Round Robin

mo_ron wrote:I've searched this forum for an answer to this question and I couldn't find anything close to this.

What I'm trying to accomplish is a round robin of sorts, but multiple steps to be executed before going to the next character in a given target group.

Say you have 2 actions that need to be performed by a group of people in an Action Target Group. Ideally it would work like ->

Keypress 1: Action 1 on Character 1
Keypress 2: Action 2 on Character 1
Keypress 3: Action 1 on Character 2
Keypress 4: Action 2 on Character 2
etc

Is there a way to do this? Currently I had to make each pair of steps for each character I want to execute them in one long Keymap.


If the actions and characters were limited to those above you would just create a Mapped Key with 4 Steps and 1 Action in each step which did the appropriate action for the appropriate Target. Each time you press the hotkey for the Mapped Key you will get the action from the next step. I assume that is what you have done but if it isn't that is the approach to use.

I'd like to get away from that because I'm taking people in and out of the groups and I would like this sequence to reflect the current members of the group as opposed to being set in stone. Thanks in advance for any help!


Will your group be the same size all the time (meaning you can use character slots) or will it be changing size (meaning Action Target Groups may be better)? Will the group always just be characters you control (easier) or will it include outsiders (harder)?

There are different ways to do this which depend upon the specifics of what you are trying to achieve. Could you describe the situation in some more detail (what actions, what group, what game, what is the desired result)?
<<

tanker

Posts: 222

Joined: Mon Jan 03, 2011 2:27 am

Post Fri Apr 29, 2011 1:45 am

Re: Round Robin

If I understand your requirements:
Keymap1:
Key 1:
step 1,2,3,4 - send key to toonA
step 5 - disable keymap1, enable keymap2
Keymap2:
Key 1:
step 1,2 - send key to toonB
step 5 - disable keymap2, enable keymap3
Keymap3:
Key 1:
step 1,2,3 - send key to toonC
step 5 - disable keymap3, enable keymap1

So toonA gets the first 4, toonB gets the next 2, toonC gets the next 3, then repeat
<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Fri Apr 29, 2011 10:05 am

Re: Round Robin

If the actions and characters were limited to those above you would just create a Mapped Key with 4 Steps and 1 Action in each step which did the appropriate action for the appropriate Target. Each time you press the hotkey for the Mapped Key you will get the action from the next step. I assume that is what you have done but if it isn't that is the approach to use


What you have described here is how I have it now and it works fine. My goal is to make the keymaps be more generic. To me, this solution as well as what was proposed by tanker are very static. They rely on certain characters/slots to always perform the task. I was shooting for something that would rely on the current contents of an action target group to define who performs the sets of actions, that way it's dynamic. If it can't be done, that's fine. The software is amazing as it is. Just having fun refining my keymaps and making them useable for other group compositions as I level up more toons :D

Maybe my example wasn't clear. How about this ->

KeymapName: DoActions
Step 1: Keystroke 1 -> Self
Step 2: Keystroke 2 -> Self

KeymapName: DoActionsRotation (Bound to key F1)
Step 1: Execute Keymap DoActions -> Group A (all) Round Robin

Assuming there are 2 toons in Group A, as I understand it now, if I pressed F1 4 times I would get ->
Toon A - Keystroke 1
Toon B - Keystroke 1
Toon A - Keystroke 2
Toon B - Keystroke 2

What I would like to have is ->
Toon A - Keystroke 1
Toon A - Keystroke 2
Toon B - Keystroke 1
Toon B - Keystroke 2
<<

lax

User avatar

Site Admin

Posts: 7301

Joined: Tue Nov 17, 2009 9:32 pm

Post Fri Apr 29, 2011 10:46 am

Re: Round Robin

Sounds like you basically have a rotation per guy (a set of steps for each guy to do when it is his turn), and then you're saying at the end of his rotation it should advance to the next guy. You only want the round robin to happen in the advance. So you do something like this for each guy's rotation:

My Rotation
Code:
Step 1:
* do key 1 -> self
Step 2:
* do key 2 -> self
* do Selext Next Guy -> 1


You can use round-robin as part of Select Next Guy, and doing the round robin in the same window (e.g. 1) will keep the round robin advancing as expected (each window has its own state for the mapped key, and would start the round robin from the beginning).

Select Next Guy might do something like this:
Code:
Step 1:
* do Make Me Next Guy -> Group (all of): setOfPossibleNextGuys  + round-robin

(note that the target could be Window:All w/ Current to include all windows)

and Make Me Next Guy:
Code:
Step 1:
* Target Group Action to leave group CurrentGuy -> Group (others in): CurrentGuy
* Target Group Action to join group CurrentGuy -> self


then your Hotkey would go on this master Mapped Key:
Code:
Step 1:
* Do My Rotation -> CurrentGuy


You would just have to make sure someone starts out as CurrentGuy, the round-robin will start at the first window in the target set (may be slot 1) so keep that in mind -- i.e. depending on how you configure it he might do two rotations due to the round-robin "advancing to" him first. But anyway, so you hit this, it does keystroke 1 for CurrentGuy the first time you press it. Second time it does keystroke 2 and tells window 1 to select the next guy. Window 1 picks a window to send Make Me Next Guy to. That window then tells everyone else to leave CurrentGuy, and joins it himself. Next time you press the Hotkey, this new CurrentGuy begins doing his rotation and the process repeats from there.

Enjoy ;)
<<

mo_ron

Posts: 22

Joined: Thu Apr 28, 2011 6:12 pm

Post Fri Apr 29, 2011 11:31 am

Re: Round Robin

Wow. That is a great solution! Thank you so much! Can't wait to get home from work and play with it.

Return to Key Maps

Who is online

Users browsing this forum: No registered users and 0 guests