• Instances - What are they?! Why use them?!
    55 replies, posted
Never heard of this before. honestly... it looks awesome.
Trying to use instances, got everything working EXCEPT my func_instance_io_proxy entity does NOT undergo name fixup during compile. Here's exactly what happens: I place an _io_proxy into my vmf that will be instanced. It is named proxy. Ther is also a prop_floor_button named button, lights, and brushes. I send the _io_proxy the OnPressed and OnUnpressed inputs from my floor_button to it's ProxyRelay input. I then place the func_instance into a new map and set it up to reference the first vmf. I put button_1 in it's name fixup and set to prefix. In hammer everything looks fine and I can hook the instance:button;OnPressed; output from the func_instance to logic_relay's. When I compile the prop_floor_button get's it's name fixed up to button_1-button but the func_instance_io_proxy does NOT (I decompiled my map to be sure and it's name is still proxy), and the I/O chain is broken.
Good news: You found the cause of the problem I've been dealing with the last few days, bad news: we can't do anything except wait for a fix. But I doubt that will ever come. Especially in this case with the instances, Valve often leaves unfinished stuff behind. Then we have to ignore that entity (at least using it four outputs (inputs seem to work)) and we could use relays outside the instance which's name we will fix up manually and refer to it by "Relay" (for example). Another way to do outputs is by replacing the targetname and input type with a variable for func_instance_parms. Edit: The problem is random. Sometimes it works, sometimes not. Sometimes the IO chain is broken, sometimes there are unknown flags activated in func_instance_io_proxy, sometimes it only doesn't seem to work when one instance sends an input to another instance.
Nice, but I like prefabs better, I'm just used to them. Instances are just another way of getting them. Look at me getting hated :) All I'm trying to say is I like prefabs better I don't know why everyone is mad at me for having preference.
Can I use wildcards on instances? Doesn't work for me at the moment. I have multiple instances each fixup named panel1, panel2, panel3... I want to fire an input using 'panel*', doesn't work though.
It does. At least from inside the instance outwards and in L4D2.
I don't know where to post this bug, or where this discussion was had before, but when I create a func_instance that uses a vmf that contains any of the entities described in DeanWinchester's portal2.fgd (I think this also applies for the Rough 'n Ready .fgd,) the entity ends up centered around 0,0,0 instead of where I put the func_instance. Like so: [URL=http://img833.imageshack.us/i/prefabtest0000.jpg/][IMG]http://img833.imageshack.us/img833/3736/prefabtest0000.th.jpg[/IMG][/URL] In this picture, I placed the button and panel prefab over where the panel is on the right, but the prop_floor_button ended up on the left, at 0,0,0. I seem to remember this is a bug everyone knows about, but no one knows how to fix. Is that still true?
Something similar happened to me when I used the mapping method via exporting all content to Alien Swarm. If you do as well, better follow this: [url]http://www.moddb.com/tutorials/getting-setup-for-portal-2-mapping[/url]
[QUOTE=DasMatze;29576693]Something similar happened to me when I used the mapping method via exporting all content to Alien Swarm. If you do as well, better follow this: [url]http://www.moddb.com/tutorials/getting-setup-for-portal-2-mapping[/url][/QUOTE] ...Holy shit, that worked! I did the following 1. Made a new game configuration from the alien swarm SDK. 2. In hammer, added the portal2.fgd and removed swarm.fgd, which I placed in $SteamUserDir/alien swarm/bin/portal2.fgd (along with halflife2.fgd) 3. Edited the $bsp_exe entry (took out -alldetail)
Am I allowed to double-post? I'm having issues with func_instance_io_proxy. Basically, they're not working, ever. [img]http://img31.imageshack.us/img31/9122/badproxy2.png[/img] [img]http://img59.imageshack.us/img59/6934/badproxy.png[/img] Basically, that big box there is a func_movelinear. It's a dummy prefab that's fairly simple. The two logic_relays in the instance were something I tried to get the func_instance_io_proxy to work. The floor button should move the func_movelinear, but nothing happens. Basically, func_instance_io_proxy doesn't work for me ever. Anyone else have this problem? [u]EDIT: name your func_instance_io_proxies, and don't use ProxyRelay1.[/u]
I'm fucking confused at this, do I put my info in the func_instance_io and trigger it from the actual map or do I put a trigger in the instance?
You make an input to the func_instance in the main map. It fetches the data of the func_instance_io_proxy.
This is one of those awesome little Object Oriented programming ideas that has finally made its way into something practical for non-programmers. Honestly, I can't believe it took so long. I don't think it's possible to do things like polymorphism or inheritance with physical things (even in-game virtual physical things) but this re-usability that instances allow is pretty awesome in and of itself.
I need help. Function_instance does not work on my map, but when I load it on another portal 2 map, it works. help please
"Function_instance does not work" is not very precise. What exactly does not work? ----------------- I started a map with the TF2 setting and now moved to HL2 EP2. For some reason the instances don't get compiled properly like they did with the TF2 setting (so they are missing). I wonder why because they both use the same SDK, the same Hammer.exe and the same VBSP.exe. The basic func_instance entity is a Hammer thing and has nothing to do with the Source engine version. Strange ...
I'm a bit confused about func_instance_io_proxy. Say, I have 50,000 doors in my map, and they all work from the same instance, but are activated by non-instance buttons. But since they are all the same instance, and have the same io_proxy, wouldn't one button open all of them? How could I prevent this?
That's what the name fixup is for.
vbsp applies it's own name fixup when it includes the instance into the map (so they don't overlap, it appends random characters to the front) You could include the trigger or such in the instance, so each door would just work, but if you want to trigger them from something else in the map you need to use a fixup name and the proxy.
[QUOTE=DasMatze;29797470]That's what the name fixup is for.[/QUOTE] Wouldn't that mean I have to save different instance variances with different names for the io_proxies in them? Or did I totally misuderstand it? Sorry, instances are new to me, and I/O has always been my weak point in Hammer.
How do I trigger a func_instance_io_proxy when what I'm viewing is a func_instance, it can't pick up the entity name so I can't trigger it. I've tried reading the OP.
[QUOTE=DasMatze;29796433]"Function_instance does not work" is not very precise. What exactly does not work? ----------------- I started a map with the TF2 setting and now moved to HL2 EP2. For some reason the instances don't get compiled properly like they did with the TF2 setting (so they are missing). I wonder why because they both use the same SDK, the same Hammer.exe and the same VBSP.exe. The basic func_instance entity is a Hammer thing and has nothing to do with the Source engine version. Strange ...[/QUOTE] As in the red func_instance entity shows up, but the actual instance or thing I want to spawn, won't show up.
[QUOTE=xeonmuffin;29802706]How do I trigger a func_instance_io_proxy when what I'm viewing is a func_instance, it can't pick up the entity name so I can't trigger it.[/QUOTE] What entity name? If there's a func_instance_io_proxy inside it, it will show inputs, like here on the left side: [img]http://img853.imageshack.us/img853/82/protip.jpg[/img] [QUOTE=green bandit;29804370]As in the red func_instance entity shows up, but the actual instance or thing I want to spawn, won't show up.[/QUOTE] As written in the first post the map must be saved once and if the browse button doesn't do anything, type the relative path by yourself.
[QUOTE=DasMatze;29805151]What entity name? If there's a func_instance_io_proxy inside it, it will show inputs, like here on the left side: [img_thumb]http://img853.imageshack.us/img853/82/protip.jpg[/img_thumb] [/QUOTE] Where did the target elevator come from? Is that the name of the instance?
[QUOTE=xeonmuffin;29818082]Where did the target elevator come from? Is that the name of the instance?[/QUOTE] When you place the func_instance give it a pre/post fix and write that as the "Target entity named".
So... By the information i skimmed over ([img]http://img443.imageshack.us/img443/2363/derpfaceplz.png[/img]Durrrrrr), Could i use these to set up a large surface of panels (As in brushes, parented to dynamic models) and have one output to activate them all? Without any Parenting mix-ups?
I posted in the Question Mega Thread, but no one responded so I'm going to try here now. I'm trying to make one of those arrival elevators from Portal 2 with the 2 func_instances (a4_base and a4_logic), but it seems like no matter what I do I can't get the "vgui_movie_display"s to play. I put a replace value in the a4_base instance to set the movie file name, so they should have a valid .bik file to play, but it won't work. I think that it has something to do with the logic_script in the a4_logic instance.
Sorry, you need to Log In to post a reply to this thread.