by Cattlesquat » April 23rd, 2020, 7:37 pm
Keep in mind that most pieces in wargames (like the piece shown in the example above) won't need to be "owned" by one player or the other in the same way that cards in a hand are -- since although only one player will "decide where to move them", either player can actually drag the piece around (and needs to be able to).
So in order to create a piece that can be assigned to either side, or even flipped back and forth between sides, you can simply create a Dynamic Property of the piece that is "Side", and at the appropriate time assign it to be one of your sides (e.g. "Allies"/"Axis", or whatever). And then you could have a Layer property which shows different graphics depending on which Side is assigned (in the Layer definition check the box for "Follows Expression Value", and in the expression box click the little expression builder button and put something like this: If(Side=="Allies",1,2) so then it would use Layer 1 if an Allied unit and 2 if an Axis. You could of course do more sides and more layers, etc.
Alternatively, you could have a piece simply "Replace With Other" itself when it is assigned a side, placing a new marker on the board representing a piece of the designated side. And you could even have THAT piece able to later switch sides by "Replace With Other"ing itself to a different piece. The Paths of Glory module has an example of this kind of piece -- the Trench markers are allowed to be "captured" if they are at Level 2 -- so e.g. a Central Powers trench at level 2 can be captured, and replaces itself with an Allied Powers Level 1 trench. I think the prototypes are called something obvious like "Trench_CP" and "Trench_AP" if you want to take a look.
Brian