Unique ID number

I need a system where every piece that is placed on the map gets its own unique ID number. I’m using the following method to accomplish this:

1) global property > Global_Counter (starts at 0,numeric, range 0 to 200)

2) Game Piece Prototype "Ship" with the following (in order top to bottom):
     2a) Text Label > $Unit_Number$
     2b)Dynamic Property - Unit_Number > starts at 0, numeric, range 0 to 200, key command "CTRL 1" set value directly $Global_Counter$
     2c) Set Global Property - Advance_GlobalCounter > Global_Counter, current zone/current map/module, numeric, 0 to 200, key command "CTRL 1" Increment numeric value by 1

3) Game Piece > Prototype > Ship

4) Standard Map > Properties > Key Command to apply to all units ending movement on this map > "CTRL 1"

Everything works beatuifully. When I drag a new piece to the map, it gets a unique id number. However when I move a piece on the map that advances the number too. The id of the unit moved also goes up by one.

How can I stop this from happening? Is there a way to restrict the number advance to only when a piece enters the map, but not when a piece is moved?

Add a Dynamic Property to the piece that’s triggered at the same time as the piece ID is triggered. For example, have it change a DP from 0 to 1. Then have your trigger set so that it will only trigger if the DP is 0.

When the piece is put on the board, it’s DP is 0 so it will trigger and change the DP to 1. It won’t trigger after that.

I think every piece is already assigned a unique ID–PieceId. Works just like PieceName or other piece properties.

If that’s the case I can’t get it to show up as a text label. I’ve tried “$pieceID$”, “$PieceID$”, “$PieceId$”, “$pieceid$”, and “$pieceId$”. None of them worked.

Basic Piece wiki: PieceId returns a string that uniquely defines the source of the piece. All pieces sourced from the same GamePiece Palette slot will have the same PieceId string.

looks like it’s not quite what you’re looking for