Instance: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Added an informative manifest tool tutorial.)
m (Added CS:GO to list of games which support instances.)
Line 2: Line 2:
An '''instance''' is a [[VMF|map (.vmf) file]] referenced inside another map through a [[func_instance]], possibly aided by a [[func_instance_parms]] and/or [[func_instance_io_proxy]].
An '''instance''' is a [[VMF|map (.vmf) file]] referenced inside another map through a [[func_instance]], possibly aided by a [[func_instance_parms]] and/or [[func_instance_io_proxy]].


{{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]] and [[Portal 2]], and will therefore not work for any other games.}}
{{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]] and [[Counter-Strike: Global Offensive]], and will therefore not work for any other games.}}


Instances are helpful in many ways:
Instances are helpful in many ways:

Revision as of 18:31, 21 August 2012

Stub

This article or section is a stub. You can help by expanding it.

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.

Note.pngNote: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 and Counter-Strike: Global Offensive, and will therefore not work for any other games.

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:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png <Output> <Instance> instance:<entity>;<input> <none> 0.00 No

Or, alternatively, you can do this:

My Output Target Entity Target Input Parameter Delay Only Once
Io11.png <Output> <Instance>-<entity> <input> <none> 0.00 No

Manifests

[Todo]

Also see

External links