Working with Instances
EDIT
Read further down the thread, I have done some testing and have gotten a pretty okay grasp on things. I also uploaded an example/demo/hilarious map I made messing around with this. Use this as an example on how to do transitions with the stock instances.
Good Enough For Science (Instance Example + VMF)
Gel Spawner - Instance Example + VMF
Button + Dropper Instance Example + VMF
instances/turbine_elevator/arrival_elevator_(your choice)_base.vmf
instances/turbine_elevator/arrival_elevator_logic.vmf
instances/turbine_elevator/departure_elevator_(your choice)_base.vmf
instances/turbine_elevator/departure_elevator_logic.vmf
instances/turbine_elevator/transitions/arrival_departure_transition_ents.vmf
The arrival and departure "base" instances have a few options, be sure you use the correct set. The "a4" are the Wheatley ones, so the elevator goes upwards in those and the elevator room isn't destroyed. If you are looking for the 1940's Aperture ones, they are in "tube_elevator" and they work just the same. You want the two actual instance entities to be in the same location, the "base" and "logic" instances are built to overlap on each other.
The arrival_departure_transition_ents.vmf is what handles the meat of getting these to actually work. You must have this instance in your map if you are using one or both instance elevators. There are individual instaces for the arrival and the departure, but I don't think they are supposed to be used independently.
There are some quirks, though. Your Portalgun upgrade and the end map text is all handled outside of the entities in a vscript. It kind of sucks. Right now I'm trying to make my own version of the arrival_departure_transition_ents.vmf instance to handle this on my own, but I think ideally it would be best to use a custom vscript so you don't have to fuck with the instances.
EDIT
Example/test/hilarious map I made messing around with this. Use this as an example on how to do transitions with the stock instances.
There are a couple of article on the VDC about instances (one, two) the second of which is written with L4D2 in mind but the concepts stay the same. Sadly there does not appear to be a ton of information about Instances, so I'm hoping to be able to expand on that once I myself have a more firm grasp of things.
Anyway, what you need to know in this example is that you can rename or "Replace" certain fields in an instance from within your map VMF. Within your instances, anything that is given a value that begins with a $ symbol grants the ability to be Replaced. The example that is given in the articles I linked is using $color in an instance, to allow your map to alter the color of an object. In the case of the Gel spawners, there are two Replacement fields - $trigger_to_start and $trigger_to_stop. In this particular case, these correspond to the names of two separate logic_relays, one that turns on the gel flow and another that turns of off.
It's important to know how sub-entities within an instance are renamed, when it is required that they are named. Part of this is handled in the func_instance in your map itself. Since our two logic_relays in our instance are named Replace-able fields (since they start with a $ symbol), giving them a name allows our map to interact with the logic entities within the actual instance.
That said, you need to understand how the renaming behavior works before you can actually target these logic entities from any I/O Outputs. The option "Entity Name Fix Up", which is at default to "Prefix", controls this behavior. Using the default "Prefix", and assuming you have given the entity it's own unique name in the "Fix Up Name" (which, for all intents and purposes, is the targetname of the instance), the new name of any entity within an instance is renamed to: (value of your map's func_instance "Fix Up Name")-(name of the entity in the instance)
It gets more complicated when, in this Paint example, we actually Replace the name of the logic_relays. So instead of the name of the entity, the name of the logic_relays is whatever we set in the Replace fields in the func_instance.
So, assuming we named the instance "test" and we Replaced $trigger_to_start to "start" and Replaced $trigger_to_stop to "stop", the name of the logic_relays that controls the starting and stopping will be called: test-start and test-stop
Still with me? Good. At this point, it's just a matter of very basic logic I/O. I setup a switch that sends a ToggleTest to a logic_case, which then either triggers test-start or test-stop during the OnTrue or OnFalse Outputs respectively. Keep in mind that, because the entities are not technically in your map in Hammer, the I/O links will appear red. This is fine, things should work properly in-game.
I know this is kind of insane to read and it's like 5:30am so I'm sure I wrote this pretty retarded and over complex. But here it is, and here's the example, and I'll be happy to help anyone with questions.
OnWhatever | Instance_fixupname | instance:entitywithin;input
It's more complicated and I have no idea why they'd do that over the way msleeper explained but I just thought I'd mention it.
Thanks for going trough all this trouble and then sharing this with us msleeper. 
msleeper wrote:
Fine by me. I put it in my signature since I think it's pretty important. Right now it's just some random musings by me, I was going to write up a more proper article once I have some more solid information.
Pretty good for random musings. Anyway, I've started cataloguing the instances on the VDC page that lists them. As of now I've only gotten the animated_panels done, but I'm working on more.
From my own conclusions, I've put down this when working with instances:
Whenever I should connect two instances together, in Hammer without doing anything hacky:
do:
connect Instance(ex:Button) output to Relay
connect Relay output to Instance(ex:Door)
don't:
connect Instance(ex:Button) output to Instance(ex:Door)
From my own conclusions, an instance's outputs shall never be directed directly into another's instance inputs, otherwise you'd have to edit a lot of dirty things into the inputs and outputs manually.
By the way, it allows to keep things clean, for example if at anytime you want all the puzzle elements from the map to just stop from working normally (example: end of map, simulated bug, player breaking the puzzle so you want to open the door manually), you just need to perform operations on the relays and they will react for you.
I'll wait for some write-ups on the VDC and whatnot, but I am glad you guys are figuring out. This is something again that is extremely useful, and valve hardly bothers to document.
On a somewhat related note, instances are completely broken on any engine previous to Left 4 Dead 2, which really blows. I started getting instances working for my mod, only to find out that VBSP doesn't collapse the instances like it should be doing, not to mention that func_instance_params doesn't even work properly. I can still use instancing for things like working with geometry, and basic prefab like functioning, but I though I'd mention this if anyone might also be working on other older engines (TF2, HL2). Sad stuff.
This is funny/sad because func_instance is in the FGD's for these games, and are supported within Hammer.
Hurricaaane wrote:
From my own conclusions, an instance's outputs shall never be directed directly into another's instance inputs, otherwise you'd have to edit a lot of dirty things into the inputs and outputs manually.
Not true it seems, at least in some instances. One thing I did find out making this example is that any Instance that is going to send an Input must have a name - even if it itself is never going to receive an Output. Not that I am at all trying to advocate not using logic_relays, if the instance calls for it then there it appears you are able to directly send I/O from one instance to another.
Joni
EDIT: Fixed, had to save the map first
reepblue wrote:
I'm planning on making a how to/info post on my blog about instancing communication with pictures and junk. If I get the time tomorrow, I will work on it.
Are you sure about this?