megmodel
megmodel [entity:<modeled_entity>] [model:<model>] (remove)
Applies/removes a model to/from an entity.
If specifying a player as the entity: should the player disconnect, the model will not persist and the player will sometimes become invisible. Use the PlayerTag.meg_make_visible
mechanism to make sure that the player, upon rejoining, is no longer invisible.
Models do not persist across worlds. Before teleportation, they should be removed and then added back.
If you have come over from Mythic, this is equivalent to the model
mechanic.
To configure other options such as hitbox/invisible/damagetint/etc, adjust the MegModeledEntityTag
object instead.
Arguments
Argument | Input | Required | Default | Description |
---|---|---|---|---|
entity | MegModeledEntityTag | yes | The entity to apply the model to. | |
model | ElementTag | yes | The model to apply. Must be a name of a loaded model in ModelEngine. | |
remove | N/A | no | Whether to remove the model instead of applying it. This is an optional argument. |
Examples
# Used to add a model to an entity when it spawns.
on zombie spawns:
- megmodel entity:<context.entity> model:my_model
# Removes the model from the specified entity.
- megmodel entity:<context.entity> model:my_model remove
See Also
- Object Type:
MegModeledEntityTag
- Tag:
PlayerTag.meg_forced_invisible
- Mechanism:
PlayerTag.meg_make_visible