From Valve Developer Community
Jump to: navigation, search

func_instance is a internal point entity available in all Source games. It inserts an instance of another VMF file into the current one. You can translate and rotate the instance without breaking anything or creating an off-grid editing nightmare.

By default, instances are drawn with an orange tint.

Note.png Note: Instances will only compile correctly in Left 4 Dead 2 or later. If you would like to use instances in TF2 or HL2 you can work around this by saving your vmf as a clone, and collapsing the instances in that clone vmf.
Bug.png Bug: Nested instances with relative file names don't work correctly in Alien Swarm, because they are handled differently in Hammer and VBSP.
Note.png Note: This is an internal entity. When the map is compiled by VBSP it is processed and then removed: it does not exist when the map is running.

Input through an instance

  1. Define a Fix Up Name.
  2. Define a value for the input or output you want to use (if there is one).
  3. Send an input to the targetname "fixupname-value", e.g. MyInstance-Start. Hammer's UI won't recognise the name, but don't worry.


VMF Filename <string>
The VMF file to insert as an instance.
Fix Up Name <string>
Essentially the name of the instance. All entities within it will have this string added to them based upon the fix up style.
Entity Name Fix Up <choices>
How to apply the fix up name.
  • Prefix (Default)
  • Postfix
  • None
Replace <string $variable> <string value>
This is a replacement parameter. Any usage of $variable inside the instance will be replaced with value.
Example: $color 255 0 0


Pitch Yaw Roll (Y Z X) (angles) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

See also