[messages] [Module General Discussion] Looking for Guidance

rrvs spideratj at aol.com
Fri Apr 28 15:27:48 CEST 2017


Test these problems when you get 'em step by step.  For example, with
this one I'd start by deleting the gkc trait that is sent by the primary
cards to the secondary cards (the one triggered by the CTRL 3 board
command).  Delete it - you don't want it anymore.  Now make a new one
with one matching property only: cardselect=="Secondary".  So that has
keyboard command CTRL 3 and sends gkc: sendSecondary.

Now ensure all prototyped secondary type cards are inactive (so none
being cardselected as secondary).  Then make a new test secondary card
on Blue's player window, but with no prototypes in it, adding only a
Blue CardSide marker and the cardselect dynamic property already set to
Secondary.  Then add a report action in it set to trigger with
sendSecondary, reporting something like "sendSecondary triggered".

Run that.  It should report with however many primary cards were sent
(regardless of side).  If it's an infinte loop, then something's causing
your CTRL 3 board trigger to repeat.  But hopefully if you ran 3 primary
cards it reported 3 times.

Now add to the primary cards' CTRL 3 triggered gkc trait, the matching
property: cardselect=="Secondary"&&CardSide==CardSide.  Run it again
with a couple primary cards, but only one blue primary card. 
"sendSecondary triggered" should now only report once (if I have that
new code right!).

When you do get this properly working, then add a Send to Location trait
triggered by sendSecondary and have to move the test card to the main
board somewhere.  Run that.  Then try fine tuning that to get it sent to
the Blue Primary cards' actual location (destination: Another counter
selected by properties, property match:
CurrentBoard=$Gameboard$&&LocationName=~1|2|3|4&&CardSide=$CardSide$.  
[I don't know how to write out =~ expressions with the new code -- so
LocationName=~1|2|3|4 for example (other than to write it out four
complete times instead and group all those in a parenthesis, so like
(LocationName==1 || LocationName==2) etc -- but there must be a shorter
way), so I'll have to use the old code on this one.]

Any problems along the way, double check that I didn't make a mistake
above, check for typos, and things like using the board name and not the
map name, etc, etc.  And then just keep adding... so get it sent below
the blue primary next, then perhaps start moving these over the
secondary cards' actual prototype, and slowly get all the card sides
working.

Let me know.

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


More information about the messages mailing list