Working with Instances
(Edit: Nevermind. Got it working)
LeSwordfish wrote:
Maybe i'm being lazy/thick, but i kinda want a instance for an elevator that goes from floor to floor without needing to fade to black/load a new map inbetween. It's that or put each new textchamber in it's own map, which has pretty big downsides. Does anyone have one of these they could give me? My attempts at making one have cause portal 2 to crash rather than loading the map.
Should be a matter of setting the lift up like the original Portal maps I would have thought; just using the new models.
Also, are all the instances I'll realistically need to make a simple map already there or will I need to download some from this website. I'm wanting to make a cube-dropper, which is a lot harder than I expected. I've seen that Msleeper has made an example one but I want mine to work slightly different.
I don't want to use a button. I want a cube to start in the map and when destroyed it auto-respawns. Could I use his instance and edit it?
Any help appreciated. Sorry I only started using Hammer yesterday.
As for the second point. Any instance is collaspable, meaning you can just edit it to what you prefer, or perhaps 'saveas' (as in not ovveride Valve's instances) the instance and edit it.
shawy89 wrote:
I don't want to use a button. I want a cube to start in the map and when destroyed it auto-respawns. Could I use his instance and edit it?
I don't think you need to edit the instance. Just us a logic_auto or trigger_once at the start of your map to send it a "trigger" and "enable auto-respawn" output, like so:
beecake wrote:
Is there a place where you can download all the standard instances if you, by a mistake, deleted one?
Perhaps (I'm not completely sure about this) you can verify integrity of cache and it will re-download it.
Will it also correct the file if it only is changed? Or do i have to delete it?
Edit: Anyway it works to verify the game cache 
beecake wrote:
I Will do thatWill it also correct the file if it only is changed? Or do i have to delete it?
Edit: Anyway it works to verify the game cache
i'm not sure but i don't think verifying the game cache will change instances but it obviously changed whatever it was that got your thing to work
though i could be wrong
They also tend to add extra details/options. For example; if you look at the info_paint_sprayer you can add normally, and one in an instance, the instance "sprayer" has about five other options affecting the size of the blobs.
Stormburn wrote:
Rather than literally editing instances, I've found it easier to just "copy-paste" the parts I need and editing them in-map. This way, I don't break the instance and I get to see exactly how valve did certain parts and customize it for my own needs (textures, etc.). I know there are options in the instance, but not as many as I'd like.They also tend to add extra details/options. For example; if you look at the info_paint_sprayer you can add normally, and one in an instance, the instance "sprayer" has about five other options affecting the size of the blobs.
If you do this you actually bypass the way the instances are intended. The main idea is that every same instance in every level is the same. So more complex things like cube droppers are best to be in an instance. If you want to adjust other settings in these things: just create a new instance and save it something like "blue_gel_white_texture", a small description of what it does.
lpfreaky90 wrote:
If you do this you actually bypass the way the instances are intended. The main idea is that every same instance in every level is the same. So more complex things like cube droppers are best to be in an instance. If you want to adjust other settings in these things: just create a new instance and save it something like "blue_gel_white_texture", a small description of what it does.
Actually, it doesn't matter.
If you copy the instance or use the instance, it stills works the same. But you need to fill in the needed to fill blanks (look for the proxies.)
I do this all the time and it works fine.
P.S you shouldn't copy parts, copy the whole instance or else the instance won't work.
spongylover123 wrote:
Actually, it doesn't matter.
If you copy the instance or use the instance, it stills works the same. But you need to fill in the needed to fill blanks (look for the proxies.)
I do this all the time and it works fine.
P.S you shouldn't copy parts, copy the whole instance or else the instance won't work.
Yes, well you're right, I also sometimes collapse instances (for example, my relaxation vault room instance has a collapsed observation room and a collapsed info sign in it).
However, I prefer to use instances as stand alone building blocks, my boxdropper instance will drop a box, boxdropper_reflective will drop a reflector cube etcetera. Basically 1 instance = 1 function. If I somehow want to improve the function, I can just edit the instance and ALL the maps that have that one function will have the upgraded version, THAT is the main advantage of using instances. One example where I encountered that advantage: I had a map in clean style, but I decided that broken was better for that map. My whole roof was made of lightpanels, 256x256 pixels, all instances, so it was just a matter of changing the instance and the entire roof and lighting in the map was fixed!
If you don't plan to make big changes in your maps, if you don't plan to update your map, if you don't plan to put your map in a mod collapsing is fine, but if you plan to do one of the previously named thing I highly suggest not to collapse instances, but create them.
The entity in question needs to have @ at the start of its name, and then put the instance in your map and you can send the entity outputs directly. Valve did this with various things in their elevator base, logic and transition entities.
I've tried validating the cache for Portal 2 and for the authoring tools, but to no avail. Google and the forum search hasn't helped either. What's going on here?
For reference the missing instance is ```
instances/underground/security_door_01_areaportalled.vmf
and it's included in
instances/multiplayer/two_player_airlock_underground.vmf
```