Func instance parms
Template:Wrongtitle func_instance_parms is a point entity for all Source games. Place one copy of this entity inside of an instance. Whenever you add a $parameter for the instance, get the properties of this entity. It will auto-populate it with the variables and allow you to indicate the variable type.
KeyValues
- parm1-10:
- Parm
<instance_parm>
- This is a parameter. It goes in the form of $variable type [default value].
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.