Making GKC Matching Properties more generic

Hello gang,

I am using a GKC to send g_command to pieces on a specific map.
Matching [ {CurrentMap==“Centauri Display”} ]

This works fine. However, I would like to put this GKC in a prototype that is “generic”. Something like:
Matching [ {CurrentMap==$Empire$ Display} ] where Marker-Empire : Centauri This fails.

I’ve tried setting up a dynamic property MapName that is set to $Empire$ Display
Matching [ {CurrentMap==MapName} ] without success.

Can someone advise on the syntax I should follow?


Edit: I am using 3.2.11

Have you tried:

[ {CurrentMap==Empire + " Display"} ]

I was struggling with syntax for a calculated property recently and had to use something like this. Empire should evaluate, then the + simply concatenates it with the text string " Display".

Excellent! That did the trick. This needs to be stated in the reference manual somewhere.



After carefully checking the effect of the GKC matching [ {CurrentMap==Empire + " Display"} ]. I found that the command I issue goes out to all Empire Displays. i.e., CurrentMap == “Centauri Display” | “Narn Display”

So there is no error with this comparison but it goes farther than I expected. I noticed this when switching to a non-phasing Display and saw changes that should not have occurred.

How would I keep a GKC localized to a specific Map when using in a Prototype? My solution was to abandon the generic prototype.