Turn Counter Global Hotkey

Hi,

Here i come with another question.

I wanna set a global hotkey linked to a turn counter that triggers a Global Key Command (with multi-action button) that restores the status of some units.

I created the turn counter and a list with 2 items (Role = attacker or defender). I added a global hotkey with the same combination that the Global Key Command here, with matching properties “Role = Attacker|Defender”. However i must be doing something bad, because it doesn’t work and sometimes the program gets not responding. I’ve tried different combinations in the properties box with the same results.

Any idea of what’s wrong?

Thanks.

Actually, two things: the OR operator is || (double pipe) not |.

However, if you want the hotkey to be triggered each time the role changes, you shouldn’t need to use the || at all. Just leave the matching property empty and it will trigger each time the turn counter is advanced.

Thanks, but i tried using the matching property empty and the program doesn´t work. It just get blocked.

This should be easy, so i don´t understand why.

The weird thing is that the Turn hotkey works for other options (like rolling a dice), but there is nothing to do with the Global Key Command.

Anyone could give me more detailed or specific instructions?. It will be appreciated.

If it works for the die roller, are you sure there a hotkey specified for the global key command?

When you say blocked, do you mean that the action simply fails to happen, or that the program responds in some way to stop it from happening? (You said earlier in the thread that Vassal stops responding.)

The property expression syntax should be Role =~ Attacker|Defender

However, as Mycenae said if you only have those two sides in the list then there is no need for the above expression check (it will always be true).

Hotkey in turn counter should fire say CTRL-A

Are you sure you have a global key command in the map (at map level) where your units are that fires on CTRL-A and issues the right hotkey (for example again CTRL-A) for the appropriate units?

Hi,

Sorry for not replying before, but i didn’t have a chance to work on the module this weekend.

Mycenae, i meant that the program stops responding. I must restart it each time. And yes, i use a hotkey specified for the global key command; now it is “shift+O”, but i tried with other combinations.

Barbanera, the global key command was located in the “Map” level. And yes, all units have the right trigger. Moreover, when i press the the hotkey manually it works, but it never does when using the turn counter (except for rolling a dice).

If the program stops responding you might have entered an infinite loop. Make sure your hotkey from the turn counter is not starting something else as well…?

Well, finally i fixed it. I think that there was a error in the location of the global key command.

Thanks.