Restricting Commands

Hello,

I have a question about designing.

I have a counter which have several actions added. There is also map window and private window in which counters can be placed. I want to make it such way that when a counter is placed on the map (map window) some commands are restricted and hidden. Same goes to private window. How to make it? I assume I have to use “Restrict Commands” plus what? I tried to add a “Global Property” to both map and private windows and connect it with “Restrict Command” through option ‘restrict when properties match’, but it didn’t work. Where should I look for the answer?

Thank you in advance for any suggestions, advices, etc.

You need to use the “restrict when properties match”.

It’s what you put in here that is important.

If you wanted to restrict commands on a map called “MainMap” you would add
the property match expression (exactly - case matching is important) :

CurrentMap = MainMap

Likewise if you had a private map window called “Toms Hand” you would use
the property match expression:

CurrentMap = Toms Hand

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Nico
Sent: Friday, February 18, 2011 4:35 PM
To: messages@vassalengine.org
Subject: [messages] [Module Design] Restricting Commands

Hello,

I have a question about designing.

I have a counter which have several actions added. There is also map
window and private window in which counters can be placed. I want to
make it such way that when a counter is placed on the map (map window)
some commands are restricted and hidden. Same goes to private window.
How to make it? I assume I have to use “Restrict Commands” plus what? I
tried to add a “Global Property” to both map and private windows and
connect it with “Restrict Command” through option ‘restrict when
properties match’, but it didn’t work. Where should I look for the
answer?

Thank you in advance for any suggestions, advices, etc.


Read this topic online here:
https://forum.vassalengine.org/t/restricting-commands/3674/1

Yes, that was easy. I over complicated things with global property forgetting that a name could be a property too. Thank you very much! :slight_smile: