I have some pieces I draw from a deck as described in Randomizing game piece images, though I am using a D2 rather than the D3 in the example code. Now that I’ve figured out the trick it works quite well doing what I needed for a permanent piece on the map. Now I am making a deck which after the piece is used, returns to the deck, and needs to randomized again when it is drawn again.
I’ve tied the Return to Deck property, with the master reset command (CTRL PAGE_DOWN). I’ve also added a new dynamic property and a trigger action.
[attachment=0]image3004.png[/attachment]
To me it looks like it should work. But when I go draw the card next time, the D2 isn’t triggered and the image doesn’t change. So what did I miss?
you’ve got your key command / property value backwards in the trigger.
The trigger property match should be: ResetImageCode==1 (to match the property name found in the Dynamic property)
and the keystroke should be: ImageSet (to match the keystroke found in the Dynamic property)
That was 1/2 right. Fortunately that 1/2 led me to figure out the rest. That then led me to a simpler way.
When ImageSet=1 did trigger the action. I should have realized, but I’m to these dynamic properties. The second part need to be a ResetImage line back with the SetImage property I referenced through the link in my 1st post. That command/keystroke set the ImageSet value back to 0. That reset the piece to it’s pre-drawn logical state.
Then the simpler way was to remove the trigger, and put the CNTL PAGE_DOWN in the second line of ImageSet. Now when I do do a master clear/reset the counters are all ready to be flipped again.
BtW, my Vassal version is 3.2.13. I run it on a Win7 system as a portable app using the batch launcher.