[messages] [Module Design] How to have a global property change based on card count
barbanera at fantafoot.com
Mon Apr 9 02:12:53 MST 2012
Where did you put the trigger? It should be put on the piece(s) that
influence the card count in the given deck.
Whatever the case, at the end of the given action (dragging,
sending-to-location, moving-fixed-distance etc) I presume some cards end
up being added to your deck and you want to query the new value of the
number of cards in the deck, correct?
If so, you should probably investigate use of the "key command to apply
to all units ending movement on this map" option, that you can find in
the map definition (obviously of the map where the deck is). Add CTRL-A
or similar there and then add a trigger on the cards (prototype) to fire
on CTRL-A when <deckname>_numPieces >= <threshold value> &&
DeckName=<deckname> and issue, say, CTRL-B. The latter will just be a
Set Global Property trait on the cards (prototype) to prompt users for
the value of your other variable. Also make sure no other piece on the
same map uses CTRL-A for something else (or use more exotic key combo,
or use Vassal 3.2.0 beta and forget about key comboes).
I have never used that map level option myself, but I think it should
work like as described above.
Read this topic online here:
More information about the messages