Sending a command to all units from a toolbar selection?

This sounds like an easy one, but I can’t find out just how to do it in the help files.

Pretty much every unit in my module has a layer that has two levels. CTRL-F always increases the level, and CTRL-U always decreases it. Each unit also has a trigger that fires CTRL-F under a certain condition, and a trigger that fires CTRL-U under a certain condition. There is also a global property, ShowLevel2, initialized to “Yes”, and a corresponding change-property trigger button that lets you select “Yes” or “No”; part of the condition of the trigger that fires CTRL-F is “ShowLevel2=Yes”. (In other words, if ShowLevel2 is “No”, no units’ Level 2 layers can be shown.)

When I change ShowLevel2 to “No”, I want to fire the CTRL-U trigger on all of the units to force them to their Level 1 layers. Is there a way I can do this?

– Don

Yes you can do this, but Im not quite following what is controlling the GP…

Regardless, as a toolbar control, you would add a Toolbar Global Key Command
and have it fire the necessary key while using the Property Filter Match
Expression: LayerName_Level = #

Post generated using Mail2Forum (

You can also use a Marker trait. Give all the units a marker. Let’s say you game them the marker:

Units = Cannons

and let’s say they are all on the map called Battlefield.

You can then send a Global Key command to…

CurrentMap = Battlefield && Units = Cannons

…and apply it to all pieces.

This works but all you are doing is adding an extra property trait to the
pieces which you do not need if you can reference a built in engine property
already inherited by all the pieces in question through an existing trait.
Layer_level is common to all in this case.

However if adding the marker property trait is cause for use elsewhere that
has nothing to do with the layers, then so much the better. 2 birds 1 stone
and all that… :slight_smile:

Post generated using Mail2Forum (