12-Jul-2023
Allows you to change the model and/or skin of anything at runtime. Its intended use is to change skins/models of monsters, players or props. Models are precached automatically.
Keyvalues |
OnDestroy Function ondestroyfn : Name of the function to use from already parsed .as script files when entity is destroyed (killed) in any way. If the function belongs to namespace, you must use prefix with the namespace name (e.g. mynamespace::MyFunction) for the keyvalue.
Name targetname : Set name of trigger_changemodel so other entities can trigger it to change model of entity specified in "Target". Every trigger use-type works uniformly. Can be kill-targeted.
Target target : Entity to change model.
New Model Name model : Path to the new model. It is precached automatically. Path starts in "svencoop" directory.
Skin skin : Skin to use on target model.
Trigger_changemodel supports "bodygroup" key (even if it is not listed in object properties). The key allows for changing of the model's bodygroup. You can set it by adding "bodygroup" key with SmartEdit mode disabled.