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.
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".
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.