[messages] Edit: Re: [Module Design] Adding a card to player hand

Tim M timothy.mccarron at sbcglobal.net
Fri Mar 6 20:30:53 CET 2015


[This message has been edited.]


"Extralean" wrote:
> I hope this is simple to do.
> 
> I added a button to my Player Hand labelled "Draw Card". With this
> button I would like to be able to draw a card from Deck A into my hand
> (as per Combat Commander) by pressing on the button. 
> How do I go about doing this?


Assuming your Action Button has an Invoke Key Command of "DrawCard"

Add a marker trait 
name: ButtonValue
Value : 1

Also add a Global Key Command
Description: Draws the card
Command Name: (no entry)
Keyboard Command: "DrawCard"
Global Key Command: "GotoButton1"
Matching Properties: DeckName = (name of your deck)
Within Deck, apply to: Fixed number of pieces 1

Now on each  card in your deck (best done w/ a prototype) add a Send to
Location trait
Description: Send card to Button 1
Keyboard Command: "GotoButton1"
Destination : Another counter, selected by properties
Property Match: ButtonValue = 1
all other fields in this trait should be blank

All there is to it - this will place a card on top of your button when
pressed. If you have multiple buttons like the CC mod, the button value
would be different for each button  as would the global key command
(gotobutton2, 3, 4 etc..) and you would add a STL trait for each button
to your cards (why best to use prototype) matching the button value

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


More information about the messages mailing list