Steps to reproduce the problem every time:
If you have an object
Then have the object create a clone of itself and destroy itself
Then have the clone set (self) example variable to something
Then have the clone create multiple clones of itself
Have the clones refer to (Original Object) example variable
They will not return the proper value.
I expected this to happen:
Referring to Original Object’s variable works as I thought
But instead this happened:
Referring to Original Object’s variable doesn’t work as I thought
Screenshots/video:
(Include project link if relevant)
Device details:
(You can go to > “About”, and take a screenshot)
Can you create a simple test project that demonstrates the bug? I think I can follow for the most part what’s going on, but it would make it more clear if you had code that demonstrates this.
The draft has almost minimal code — it’s all in the Main Glass Pane object.
First, it creates a clone of itself and sets its Clone Mode variable to 0 — so that the clones know to just recreate the original object. It clones itself and removes itself (the delay is there for debugging).
This is done so if somebody wants to change the color and size, etc, they would need to do it only in the “When object is cloned” block, instead of both in the “When object is cloned” block and the “When game starts” block.
Then, when you tap the screen, the Breaker object gets shown (invisibility change) for a bit.
The glass object(s) detect(s) that and set(s) their/its Clone Mode to 1 (so that the clones know to base their properties off variables), then sets multiple variables to control the clones’ width, height, etc, then clones. That happens 4 or less times. Then it’s supposed to destroy itself.
The clones, however, (through a Show Popup block) tell me that the (original object)’s clone mode is apparently 0.
I have changed some of the behaviour to debug, so the clone does not destroy itself.