03-10-2021, 08:11 AM
(This post was last modified: 03-10-2021, 08:13 AM by MatthewStephenson.)
Hi,
I'm not sure exactly what you discussed with Eric. but you can specify a dynamic region inside a metadata line, for example, the following would add a wave symbol to all empty sites
(show Symbol "water" (sites Empty))
NOTE. This actually doesn't work with v1.1.16, due to a bug in show Symbol, so in the meantime you can use the following code to colour the region as a substitute to check that it works how you want.
(region Colour (sites Empty) (colour 150 150 150))
You can replace it with the correct line in the next release.
You will also need to add this line to your metadata (board RedrawAfterMove). To let the app know that the board needs to be redrawn each move, as you are using a dynamic region in its creation.
You need to place the state: parameter before the rename String, eg.
(piece Rename piece:"Carrier" state:0 "square")
Cheers,
Matthew
Quote:If we really hold to the principle that I should not have Waves pieces, then I need a graphical meta-data way of saying place a waves symbol on an empty site if that site has such and such a state. I think it would be simpler to have a Shared Waves piece and simply place one in the event of a miss, but it does not matter to me.
I'm not sure exactly what you discussed with Eric. but you can specify a dynamic region inside a metadata line, for example, the following would add a wave symbol to all empty sites
(show Symbol "water" (sites Empty))
NOTE. This actually doesn't work with v1.1.16, due to a bug in show Symbol, so in the meantime you can use the following code to colour the region as a substitute to check that it works how you want.
(region Colour (sites Empty) (colour 150 150 150))
You can replace it with the correct line in the next release.
You will also need to add this line to your metadata (board RedrawAfterMove). To let the app know that the board needs to be redrawn each move, as you are using a dynamic region in its creation.
Quote:However this gives one of those "The game could not be compiled, but no specific error was identified" errors. In fact any attempt to make (piece Rename ) dependent on state does this. I have added a .lud file.
You need to place the state: parameter before the rename String, eg.
(piece Rename piece:"Carrier" state:0 "square")
Cheers,
Matthew