Passing a value to a created piece

I am struggling to find a technique whereby I can set a new piece to a state (at creation) derived from a piece that creates it. Specifically, to set a layer level in the new piece that varies depending upon the original piece.

Perhaps I have missed something simple, or perhaps it’s not possible and I have to take a different approach. It will be less elegant, so before doing that, I wonder if any one can point me towards better knowledge.

Some low-lights to highlight my level of (mis)understanding:

At first, I tried the Place Marker trait. I soon realised that I could not reference properties held within the piece from which the Place Marker trait was defined. Even the predefined old[property] get initialised to the same as new[property] when a piece is created, ignoring the values of the piece on which the Create Piece command was executed (I wasn’t surprised, I guess it might get confusing, if it were possible).

Next up was to learn that Global Property would not be suitable because then all the created pieces change state in line with changes to the Global Property, no matter how I use the Global Property value within the created piece.

So I looked at Replace with Other - (combined with a clone of the original piece) - the property “Match Current State” made me hopeful. However, I can’t get this to work and I’m not sure why it would replace, for example, a Dynamic Property defined (or not) on the new piece with a different value from the original piece. It doesn’t, so far as I can tell from testing.

I have found a useful property demonstration in an old thread on this site. If anyone has some ideas I can use that to experiment further and narrow down my problem, if that helps.

(1) Creating piece sets Global Property to the state it wants the new piece to have/know.
(2) Creating piece does a Place Marker.
(3) The Place Marker uses the “keystroke after placement” field to activate a trait in the new piece.
(4) New piece copies the information from the Global Property into somewhere internal (Dynamic Property, or sets some other state within itself) based on the Global Property.

Now, when the Global Property inevitably changes again (because some other piece has used it), the created piece doesn’t change along with it because it copied the information out to its own spot. The Global Property in this method is just a temporary avenue for communicating the desired state.

A note of thanks to Cattlesquat … you gave me renewed confidence and today I got back to this area of the module that I am working on, armed with three weeks deeper knowledge of how the various elements of triggers, global and dynamic properties work. This time I was able to get the thing working exactly as I had intended. Thank you!

Yay!