[messages] [Module Design] send to "random" location
spideratj at aol.com
Thu May 11 14:23:27 CEST 2017
I'd suggest using the random element in a Layer trait, which keeps the
whole operation in the counters themselves. I'd put these in their own
prototype folder, then add that to the appropriate counters.
You'd have a layer trait named RandomHexLayer and it would be Always
Active and have a key command for randomize (I'll use: goRandom).
There's no menu command for that as a Trigger Action will be used
instead. So goRandom chooses a random level... you'd add as many levels
as you need... no images in any of them (so the layer and all its levels
will be hidden), and put the hex location name as each level's name...
so in your example, levels 1-3 of the layer would each be named: 0101,
level 4 would be named 2447, etc.
Now add a Send to Location, with no command name and a key command of
goRandomHex. If your module actually uses those hexes as grid
locations, then you can send it to 'grid location on selected map',
choose the map and board, then add: $RandomHexLayer_Name$ to the grid
Now add a Trigger Action with command name something like "Send to
random location" or whatever, with whatever key command you want, having
it watch for that same key. Then add performs: goRandom and goRandomHex
in that order [and maybe ReportRandomMove too if you want to add a
Report Action noting the move in the message window].
One problem with this method is the counter is now named ($pieceName$,
$newPieceName$) after the layer name itself (the hex #). You can use
$BasicName$ to report any moves, etc, or you can make the layer not
always active, and add commands to turn it on and back off again (before
and after the other two actions) in your Trigger Action.
Hope that makes sense, and is actually correct. Any questions or
problems with it, just ask.
Read this topic online here:
More information about the messages