Func instance: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (→KeyValues) |
||
Line 27: | Line 27: | ||
{{KV|VMF Filename|intn=file|string|The VMF file to insert as an instance.}} | {{KV|VMF Filename|intn=file|string|The VMF file to insert as an instance.}} | ||
{{KV|Fix Up Name|intn=propagate_fixup|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, <code>InstanceAutoX</code> or <code>AutoInstanceX</code> will be used, where X is a number that is incremented with each instance. | {{KV|Fix Up Name|intn=propagate_fixup|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, <code>InstanceAutoX</code> or <code>AutoInstanceX</code> will be used, where X is a number that is incremented with each instance. | ||
{{ | {{ModernNote|Entity names that start with the <code>@</code> symbol e.g. '''@exit_door''' will not be changed by the instance name fix up. {{todo|only confirmed for [[Portal 2]]}}}}}} | ||
{{KV|Entity Name Fix Up|intn=fixup_style|choices|How to apply the fix up name.}} | {{KV|Entity Name Fix Up|intn=fixup_style|choices|How to apply the fix up name.}} | ||
:*0: Prefix (Default) | :*0: Prefix (Default) | ||
Line 33: | Line 33: | ||
:*2: None | :*2: None | ||
{{KV|Replace|intn=replace01|instance_variable| This is a replacement parameter. Any usage of <code>$variable</code> inside the instance will be replaced with <code>value</code>. Replace <code><string $variable> <string value></code>. '''Example''': $color 255 0 0. | {{KV|Replace|intn=replace01|instance_variable| This is a replacement parameter. Any usage of <code>$variable</code> inside the instance will be replaced with <code>value</code>. Replace <code><string $variable> <string value></code>. '''Example''': $color 255 0 0. | ||
{{ | {{ModernNote|There are 10 ''Replace'' key-value pairs with the keys following ''replace'''''{number}''' for names: '''replace01''', '''replace02''', '''...''', '''replace10''' }}}} | ||
{{KV Angles}} | {{KV Angles}} |
Revision as of 10:55, 26 July 2022
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 in Hammer with an orange tint, though this can be disabled in Instancing > View Instances
.
Instances allow you to edit the vmf of the instance and have every used instance on your main map be changed as well. But unfortunately many instances will lag hammer quite alot.
Template:ModernNote Template:ModernNote
Template:ModernBug Template:ModernBug Template:ModernBug Template:ModernBug Template:ModernBug
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 (file) <string>
- The VMF file to insert as an instance.
- Fix Up Name (propagate_fixup) <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,
InstanceAutoX
orAutoInstanceX
will be used, where X is a number that is incremented with each instance.
- Entity Name Fix Up (fixup_style) <choices>
- How to apply the fix up name.
- 0: Prefix (Default)
- 1: Postfix
- 2: None
- Replace (replace01) <instance_variable>
- This is a replacement parameter. Any usage of
$variable
inside the instance will be replaced withvalue
. Replace<string $variable> <string value>
. 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.