Func instance: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		 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.
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.
 Warning:Loading instances recursively (e.g. an instance of itself in the same instance) will crash Hammer!
Warning:Loading instances recursively (e.g. an instance of itself in the same instance) will crash Hammer!
 Bug:Nested instances with relative file names don't work correctly in Alien Swarm, because they are handled differently in Hammer and VBSP.  [todo tested in ?]
Bug:Nested instances with relative file names don't work correctly in Alien Swarm, because they are handled differently in Hammer and VBSP.  [todo tested in ?]
 Note:Entity names that start with the
Note:Entity names that start with the 
		
	
| m (→See also) | m (categorizing, the lack of sort index is intentional) | ||
| Line 39: | Line 39: | ||
| *[[func_instance_origin]] - Helper entity that defines the center point of an instance. | *[[func_instance_origin]] - Helper entity that defines the center point of an instance. | ||
| *[[L4D2 Level Design/VMF Instances]] - A tutorial on how to use this entity in Left 4 Dead 2. | *[[L4D2 Level Design/VMF Instances]] - A tutorial on how to use this entity in Left 4 Dead 2. | ||
| [[Category:Instances]] | |||
Revision as of 04:14, 11 June 2011
Template:Point ent 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: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.
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. Warning:Loading instances recursively (e.g. an instance of itself in the same instance) will crash Hammer!
Warning:Loading instances recursively (e.g. an instance of itself in the same instance) will crash Hammer! Bug:Nested instances with relative file names don't work correctly in Alien Swarm, because they are handled differently in Hammer and VBSP.  [todo tested in ?]
Bug:Nested instances with relative file names don't work correctly in Alien Swarm, because they are handled differently in Hammer and VBSP.  [todo tested in ?]Input through an instance
- Define a Fix Up Name.
- Define a value for the input or output you want to use (if there is one).
- Send an input to the targetname "fixupname-value", e.g. MyInstance-Start. Hammer's UI won't recognise the name, but don't worry.
KeyValues
- 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. If no name is provided, InstanceAutoXorAutoInstanceXwill be used, where X is a number that is incremented with each instance.
 Note:Entity names that start with the
Note:Entity names that start with the @ symbol e.g. @exit_door will not be changed by the instance name fix up. Todo: only confirmed for Portal 2
- 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 $variableinside the instance will be replaced withvalue.
- Example: $color 255 0 0
- Pitch Yaw Roll (Y Z X) (angles) <QAngle>
- 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
- func_instance_parms - Entity to control parameters within instances.
- func_instance_io_proxy - Entity that is used as a proxy for entity I/O within instances.
- func_instance_origin - Helper entity that defines the center point of an instance.
- L4D2 Level Design/VMF Instances - A tutorial on how to use this entity in Left 4 Dead 2.