Working with Instances
Quote from Stylus on May 14, 2011, 5:28 pmI'm really impressed with instances!! When i first found out about them I was confused a lot since i didn't really understand anything but the basic idea of it. so this is going to save up a lot of time + i'm learning something new which is always a good feeling.
Thanks for going trough all this trouble and then sharing this with us msleeper.
I'm really impressed with instances!! When i first found out about them I was confused a lot since i didn't really understand anything but the basic idea of it. so this is going to save up a lot of time + i'm learning something new which is always a good feeling.
Thanks for going trough all this trouble and then sharing this with us msleeper. 
Quote from WinstonSmith on May 14, 2011, 8:36 pmAlright, if you don't mind msleeper I'm going to go ahead and sticky this, simply because it's such a crucial part of Portal 2 mapping and there's a heck of a lot of good info here. My guess is that if we don't sticky it we'll get a lot of "how do I make instances work" threads.
Alright, if you don't mind msleeper I'm going to go ahead and sticky this, simply because it's such a crucial part of Portal 2 mapping and there's a heck of a lot of good info here. My guess is that if we don't sticky it we'll get a lot of "how do I make instances work" threads.
Quote from msleeper on May 14, 2011, 8:48 pmFine 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.
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.
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
Quote from WinstonSmith on May 14, 2011, 10:30 pmmsleeper 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.
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.
Quote from Hurricaaane on May 15, 2011, 6:10 pmI'm not sure if this does any sense but...
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'm not sure if this does any sense but...
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.
Author of Minecraft mods (MAtmos, Minaptics, NoteSlider) and Garry's Mod addons (Gunstrumental, SharpeYe, GarryWare, DepthHUD).
Quote from MrTwoVideoCards on May 15, 2011, 6:27 pmInstancing is still confusing the fuck out of me. I'm gradually graduating from plopping in instances that function on their own,to instances I/O I'd have to manually edit.
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.
Instancing is still confusing the fuck out of me. I'm gradually graduating from plopping in instances that function on their own,to instances I/O I'd have to manually edit.
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.
Quote from msleeper on May 15, 2011, 11:17 pmHurricaaane 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.
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.
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.
Quote from reepblue on May 16, 2011, 12:16 amI'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.
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.
The more you give, the less appreciated it will be received.
Quote from Joni on May 16, 2011, 10:43 amWhen i try to make a instance in my map, it jst shows the normal small cube, not the elevator. Anyone seen something familiar?
JoniEDIT: Fixed, had to save the map first
When i try to make a instance in my map, it jst shows the normal small cube, not the elevator. Anyone seen something familiar?
Joni
EDIT: Fixed, had to save the map first
Quote from Mr. Happy on May 16, 2011, 12:55 pmreepblue 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?
Are you sure about this?

