Counting cards in a player hand and displaying it

OK, so I know about counting cards in a deck, but since a player hand isn’t a deck, is it possible to count the number of cards there? And also, if it is, is it possible to display that dynamically on the toolbar button that shows/hides the hand?

Yes it’s possible, create each player card area as a zone and have a trigger that increments the count of the pieces in each zone as cards move in and decrements when they exit the zone.

As far as displaying on the toolbar, couldn’t tell you, but if you can display a global property value as the button text, it should work.

Alright, so I have the zone set up with my irregular grid moved in, but do I need to use the “hotkey to use on all pieces ending movement on this map” in order to trigger an action, or is there some attribute I can set on the zone itself to do that?

Yes, you’ll need to have a key command as a trigger either from the ‘all pieces moved to this map’ or from a command tied to the card (which requires that the user do that command, not just drag a card with the mouse.) You’ll also want to include a trigger to decrement the count when the card is not in the player’s hand zone by using a CurrentZone != playerzone property match.

Hmm, unfortunately, I don’t even know how to increment/decrement values using VASSAL’s properites… I’ve never seen it anywhere in, say, set global property, which is the only thing I could see that would change any property value.

A counter can do this using the ‘Set Global Property’ trait.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)