Instance: Difference between revisions
Jump to navigation
Jump to search
Note:While working inside Hammer for all Source games, instances are currently only supported by the map compilers for
Left 4 Dead 2,
Alien Swarm,
Portal 2,
Team Fortress 2, and
Counter-Strike: Global Offensive, and will therefore not work for any other games. To use them in unsupported games, see below.
Note:In
Team Fortress 2 instances have some broken or missing functionality: instance I/O system is unsupported, instances cannot be nested, displacements within an instance may not compile properly and any env_cubemaps inside of an instance will not be compiled into the final map.
Metapyziks (talk | contribs) |
(Added a note on limited TF2 functionality.) |
||
Line 3: | Line 3: | ||
{{note|While working inside [[Hammer]] for all Source games, instances are currently only supported by the map compilers for {{l4d2}}[[Left 4 Dead 2]], {{as}}[[Alien Swarm]], {{portal2}}[[Portal 2]], {{tf2}}[[Team Fortress 2]], and {{csgo}}[[Counter-Strike: Global Offensive]], and will therefore not work for any other games. To use them in unsupported games, see below.}} | {{note|While working inside [[Hammer]] for all Source games, instances are currently only supported by the map compilers for {{l4d2}}[[Left 4 Dead 2]], {{as}}[[Alien Swarm]], {{portal2}}[[Portal 2]], {{tf2}}[[Team Fortress 2]], and {{csgo}}[[Counter-Strike: Global Offensive]], and will therefore not work for any other games. To use them in unsupported games, see below.}} | ||
{{note|In {{tf2}}[[Team Fortress 2]] instances have some broken or missing functionality: instance I/O system is unsupported, instances cannot be nested, displacements within an instance may not compile properly and any env_cubemaps inside of an instance will not be compiled into the final map.}} | |||
Instances are helpful in many ways: | Instances are helpful in many ways: |
Revision as of 04:23, 30 September 2017
An instance is a map (.vmf) file referenced inside another map through a func_instance, possibly aided by a func_instance_parms and/or func_instance_io_proxy.








Instances are helpful in many ways:
- They provide a more dynamic alternative to prefabs, as any changes to the instanced map will be reflected in all instances of it.
- They provide an alternative to visgroups, as they can be used to divide a large, unwieldy map into several smaller, manageable ones (that can even be worked on by multiple authors simultaneously).
- They provide a simple way to edit portions of a map that needs to be at a non-orthogonal angle. (Build the map on-grid inside a separate map, and then instance it into another map through a func_instance rotated at the correct angle.
- They provide a way for maps to work on multiple platforms, such as Left 4 Dead and Left 4 Dead 2 versions of the same map.
How to
In Portal 2 to give input to an entity within a instance use this:
Or, alternatively, you can do this:
Manifests
[Todo]
Workaround for any Source game
To use instances in unsupported Engine versions, Metapyziks wrote a program that merges used instances with the main VMF.
Also see
- L4D2 Level Design/VMF Instances - A Valve tutorial on how to use instances in Left 4 Dead 2.
- Working with instances - A tutorial on how to use instances in Portal 2.