Here is specifically what I'm trying to do. I want to make a chest that has a switch or lever attached to it. The switch will do something to that chest. But I want to be able to copy this chest/switch amalgamation and paste it elsewhere in the game world and have it work just like the first. This means that on the switch, I cannot make an absolute reference to that specific chest, or else the switches on any future copies of the amalgamation will refer to that first chest (which, as far as we know, could be miles away) instead of the chest to which its 3D model is physically "attached."
I'll try to clarify further. Imagine I make Chest 1 and attach Switch 1 to it. (When I say "attach," I just mean that the switch appears to be physically mounted on the chest.) I write a script for Switch 1 so that when activated, it does something to Chest 1. Now imagine that I copy both of these and paste them elsewhere. We will call these Chest 2 and Switch 2. I want Switch 2's script to reference Chest 2 without having to actually change the script at all, so that when I pull Switch 2, it affects Chest 2, not Chest 1. This means that Switch 1 cannot be directly pointing to Chest 1; it has to be pointing to whichever chest it is "linked" to. I don't want to have to re-link every new switch to every new chest. If this is possible, I would like to save the chest/switch amalgamation as its own object or group of objects, so that I can just drag it into the render area from the object library.
I don't know anything about linking, or what links are, or if "linking" is the right term to be using, but hopefully you can understand what I mean from this post. Thanks in advance for your help.