There are two ways to build the hierarchy: either attach all Moleks directly to the parent Chemic, or create a chain. I’m guessing the chain would be more suitable in your game. If a middle (blue) Molek in the chain is removed, it will automatically break into two smaller chains. Or you can detach pink molek from yellow as well.
I'll try for the latter case in this instance. Basically anything breaking off from the chain will act as they would if Z were pressed, and (in this example) pink and yellow would bullet out of there separately from each other.
I’d strongly suggest using the hierarchy feature instead, it will be A LOT easier. Attach Moleks to Chemic as children - this way, they’ll automatically move together and stay logically connected. You won’t need dictionaries or extra variables at all. You can find parent or child object at any time with "Pick parent/child" condition.
The dictionary will be necessary for another aspect of the overall project that this stems from, where I'll need to call on it for an overall shape to be built, checking if numbers match the shape intended.
construct.net/en/forum/construct-3/how-do-i-8/check-shape-built-185425
It seems to be the only thing that works so far, and to remove the dictionary entirely would mean to overhaul this system that's worked for me.
With all this in mind, where would you suggest the overhaul begin?