[messages] [Module Design] Global command to shuffle multiple Decks

greenknight roe.dmb at gmail.com
Thu Sep 22 14:23:30 CEST 2016


It worked, sort of:

- I made an invisible piece with 4 Global Hotkey traits (since there are
4 decks to shuffle)
- A made a Startup Global Key Command that sent a command to the
invisible piece

All 4 decks gets shuffled, no problem.

However, when a deck is shuffled, it generates a report. This is as
intended.

BUT

When I start a new game, then close it, then start another game, it
looks like the startup command keeps triggering new shuffles in the old
damage decks.

Here is an example after I've started 3 new games. If I start a 4th, I
get 4 lines per message. 

* Green Knight shuffled Damage Deck 1
* Green Knight shuffled Damage Deck 1
* Green Knight shuffled Damage Deck 1
* Green Knight shuffled Damage Deck 2
* Green Knight shuffled Damage Deck 2
* Green Knight shuffled Damage Deck 2
* Green Knight shuffled Damage Deck 3
* Green Knight shuffled Damage Deck 3
* Green Knight shuffled Damage Deck 3
* Green Knight shuffled Damage Deck 4
* Green Knight shuffled Damage Deck 4
* Green Knight shuffled Damage Deck 4

Since the reports are triggered by hotkey, not key command, I can't
suppress individual reports.

I tried setting a global property that changes when the decks are
shuffled, but it looks like this property is discard when I close a game
and start a new one. 

Or I'm just doing it wrong.

Any suggestions?

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=52194#p52194


More information about the messages mailing list