VASSAL Reference Manual
The Clone trait provides the capability for a piece to be duplicated by players during a game.
When this trait’s Key Command or menu item is activated, an exact copy of the piece is placed in the game at the same location.
The piece that initiates the first Clone, and all subsequent pieces Cloned from Clones, have a unique value (the value of the UniqueID property from initially Cloning piece) stored into the property CloneID that uniquely identifies that set of clones.
This allows any of the Clones to use the Global Key Command trait or the Set Piece Property trait to communicate with the other Clones by including the following in the Additional matching expression:
If you need to know which of the Clones was the initial piece that was cloned, it will have a value for the CloneID property that is equal to its own UniqueID property.
|If you pull a new version of a piece that has been Cloned from a Piece Palette, it will NOT have a value for CloneID and if you then Clone it, the value of CloneID for it and the clone will be different to any earlier Clonings of the earlier version of the piece.
Back to Trait List