Create account / Log in

Using piece Global Key Command Questions.

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Using piece Global Key Command Questions.

Postby Flaney » May 13th, 2014, 4:17 am

Hello Folks,

When a piece having a MarkerProperty [ Empire = Narn ] executes a GKC with Matching[ Bank=={Empire} ], will the GKC text command reach a() matching unit(s) located on another board (or MapWindow) having a MarkerProperty [ Bank = Narn ]?

I think this works...

However, when I put that GKC into a Prototype Property, the behavior fails. Does the Prototype Property prevent the resolution of finding the other board location in a different Map Window? It does seem to find all matching units from the same Map Window it occupies.

Putting the GKC into a Prototype would allow me to make the Properties in the Prototype generic so that I could copy it to similar units of different nationalities and maintain standardization of behavior.


-----------
I want to exhaust the possible methods of making this happen before resorting to crazy implementations of sending self-destructing units that sends the GKC in the MapWindow where the target command text needs to be issued.

Thanks,
Flaney
Flaney
 
Posts: 106
Joined: March 18th, 2011, 9:11 am

Re: Using piece Global Key Command Questions.

Postby DrNostromo » May 13th, 2014, 1:52 pm

If you are trying to send GKC to other map windows, you have to include the window in your property matches: For example

CurrentMap = $(map containing the pieces you want to send the GKC to)$ && Bank = Empire
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA

Re: Using piece Global Key Command Questions.

Postby grouchysmurf » May 13th, 2014, 1:58 pm

Also, make sure you got the trait order right (viewtopic.php?f=6&t=178).
User avatar
grouchysmurf
 
Posts: 129
Joined: August 9th, 2011, 7:48 pm

Re: Using piece Global Key Command Questions.

Postby Flaney » May 13th, 2014, 9:42 pm

DrNostromo wrote:[Y]ou have to include the window in your property matches: For example

CurrentMap = $(map containing the pieces you want to send the GKC to)$ && Bank = Empire


Does the Window or board property name need the $'s notation? How would I implement a board named "Centauri Forcepool" where I want to use a Marker to substitute the "Centauri" portion, say like CurrentMap == Empire +" Forcepool"

I am finding the new {...} notation and the $...$ for Matching to be quite confusing. Can anyone detail a quick list of rules/ examples for the current methods?

Thanks

flaney
Flaney
 
Posts: 106
Joined: March 18th, 2011, 9:11 am

Re: Using piece Global Key Command Questions.

Postby grouchysmurf » May 14th, 2014, 7:00 am

My approach is to have everything in curly braces. When using an expression builder -- which is the best way to avoid typos and hard to detect bugs -- everything you type in is put in braces, anyway.

As for the Empire Forcepool, you would use CurrentMap = $starname$ + " Forcepool". If it does not work, try $starname$" Forcepool". I've had similar problem and the latter approach worked (viewtopic.php?f=6&t=7272).
User avatar
grouchysmurf
 
Posts: 129
Joined: August 9th, 2011, 7:48 pm

Re: Using piece Global Key Command Questions.

Postby DrNostromo » May 14th, 2014, 3:01 pm

Does the Window or board property name need the $'s notation?


No, my mistake. Simply name the map window with no symbols.

The $ is used for variables and you would use them if you're looking for a variable value.

For example, lets say your player sides are name Player1, Player2, etc. and each player has their own map window with each called Player1_Hand, Player2_Hand, etc. If you wanted to direct a GKC to the map window named for the player who initiated the action, you would use:

CurrentMap = $PlayerSide$_Hand
User avatar
DrNostromo
 
Posts: 1036
Joined: December 21st, 2007, 3:54 am
Location: Wine Country, Cal. USA


Return to Module Design

Who is online

Users browsing this forum: No registered users and 1 guest