[messages] [Module Design] Re: global key command in player hand
irishwulf at gmail.com
Tue Jan 31 08:49:13 MST 2012
> "irishwulf" wrote:
> > 1) Make an at-start stack in your player hand with one piece, no
> > image, to get the cards for you. I call mine CardRetriever.
> > 2) Give CardRetriever a GKC trait to do what you wanted your button
> > to do, i.e. send CTRL-A to 1 card with matching properties: DeckName
> > = yourDeck. You don't need to specify CurrentMap = Main Map, but
> > you can and it's probably a good idea. The 'Keyboard Command' can
> > be anything you like, even CTRL-A.
> > 3) Now redirect your GKC button to trigger the GKC trait on
> > CardRetriever; so use matching properties: BasicName = CardRetriever
> > and have the GKC match the 'Keyboard Command' you picked for the GKC
> > trait on that piece.
> Wouldn't CardRetriever have to have a different name for each player's
> hand? And possibly a different keystroke for each player?
Actually, I do this all the time, and it can have the same name and
keystroke for every player window. Usually I am very careful about
keeping player side references abstract so that I can just copy/paste
the player 1 window(s) at the very end of development. There are two
ways I've gone about this:
(1) If your player windows' names include the player side, you can have
a Send To Location trait reference the playerSide global property in the
Map name. You can also specify a zone, region, or coordinates at this
point, but perhaps the Player Hand container automatically arranges the
pieces for you.
(2) If the player windows aren't named after the player sides, or if you
need more flexibility, you can have the CardRetriever set a property,
say, 'Summoning', and have your Send To Location use the 'piece with
matching properties' (or whatever it's called) with Summoning = true.
Note that Return to Deck must have its deck either chosen by the player
at runtime, or specified statically at build time. It is therefore evil
in my opinion, and can usually if not always be replaced by Send To
Read this topic online here:
More information about the messages