[messages] [Module Design] Replace with other and Layer
drnostromo at drnostromo.com
Tue Jan 15 09:34:46 MST 2013
Off the top of my head, you could probably do something like this.
I'm assuming you are using a Dynamic Property to control the layer
display. If not, you'll probably need to in order to get this to work.
Let's call this Dynamic Propert - LayerValue
Create a Global Property and call it something like - TempLayerValue.
Make sure it's numeric.
Include a Trigger Action in your original piece to control the swap.
Have it trigger the following
Set Global Property - Set - TempLayerValue - to - $LayerValue$
You'll next need to trigger a Place Marker trait (if you just want to
get a clone of the replacing piece) or a Global Key Command (if you want
to get the actual piece). In the latter case, the piece will obviously
need a Send to Location trait that will send it to your currently
You'll then need a Global Key Command to send a command to all pieces
where - LocationName = $Location$ that would trigger a command to set a
Trigger the Dynamic Property to set - LayerValue - to $TempLayerValue$.
This will cause the Dynamic Properties to match on both pieces.
Then trigger a Delete trait (If you wish to remove the piece from the
game), a Return to Deck trait (if you wish to send the piece back to a
deck), or a Send to Location trait (if you wish to send the piece
elsewhere) on the original piece to remove it.
I think that would work.
Read this topic online here:
More information about the messages