func_instance_parmsis a 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.
- parm1 to parm10
- 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.
- [default value]: The default value of the value type. In the case of value type color1, the default value is 255 255 255.
Warning: If using a targetname variable, Hammer will add the fix-up name to the variable wherever it's used, i.e. myinstance-$variable
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:
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.