func_instance_parms
func_instance_parms
is an internal point entity available in all Source games. When placed inside an instance, it handles conversion between $parameters and the properties of other entities in the instance.
KeyValues
- parm1 to parm10 <instance_parm>
- This is a parameter. It goes in the form of
$variable type [default value]
.- $variable: The $name can be anything and then used as a KeyValue for an entity within the instance. For example, it can be $beamcolor. In turn, $beamcolor is used as the value for the color property (instead of the standard "255 255 255" value) of a prop_static entity, appropriately a metal crossbeam model.
- type: It is a value type that is selected from a list. The value type for $beamcolor is color1.
- Note:It is currently assumed that the type matches the keyvalue that it represents. This will require more testing in order to confirm that.
- angle
- angle_negative_pitch
- axis
- boolean
- choices
- color1
- color255
- decal
- filterclass
- flags
- float
- instance_file
- instance_parm
- instance_variable
- integer
- material
- node_dest
- node_id
- npcclass
- origin
- particlesystem
- pointentityclass
- scene
- script
- scriptlist
- side
- sidelist
- sound
- sprite
- string
- string_instanced
- studio
- target_destination
- target_name_or_class
- target_source
- vecline
- vector
- [default value]: The default value of the value type. In the case of value type color1, the default value is 255 255 255.
Usage
Alien Swarm SDK has great examples of the use of func_instance_parms in instances. Some instances containing func_instance_parms are used in mapsrc/ASI-Jac1-LandingBay_01.vmf:
- mapsrc/instances/railings_80square.vmf
- mapsrc/instances/landingbay_door_unlocked_01.vmf
- mapsrc/instances/spawners/floor_spawn_holdout01.vmf
One such case is railings_80square.vmf. It is a complex set of models that are placed repeatedly throughout the map with varying colors. func_instance_parms is added to the actual VMF/map file that contains the prefab (i.e. treated as an instance) and can "pass along" parameters to any func_instance that refers to it. In other words, each func_instance that refers to that VMF/map file containing the model set can have a different color set up.
See also
- func_instance
- 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.