Mythicmob NPC Play Animation
Plays a ModelEngine animation on a MythicMob NPC
Fields
| Field | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
target | MythicMobNpcFactTarget | — | —
|
| Field | Type | Default | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
npc | Ref<MythicMobNpcInstance> | — | MythicMob NPC instance to inspect.
|
| Field | Type | Default | Description |
|---|---|---|---|
definition | Ref<MythicMobNpcDefinition> | — | — |
spawnLocation | Var<Position> | ORIGIN | —With rotation |
data | List<Ref<EntityData<*>>> | empty | — |
activity | Ref<out EntityActivityEntry> | — | — |
group | Ref<out GroupEntry> | — | — |
secondaryOffset | Vector | {"x":0.0,"y":0.0,"z":0.0} | Offset (X, Y, Z) for the secondary focus point (automatically created with empty text) |
radiusDouble?animationStringspeedDouble1.0forceBooleanfalseCommon TypeWriter fields (criteria, modifiers, triggers)
| Field | Type | Default | Description |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
modifiers | List<Modifier> | empty | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
Fill target.npc with the instance and animation with the animation name from the model (BetterModel or ModelEngine). The animation plays once, then the NPC goes back to its idle or walk animation. target.radius is the search radius around the spawn point (default 5 blocks, also used when it is 0). speed is the playback speed; 0 or less plays at normal speed. With force on, the other animations this action started on the NPC are stopped first, so none of them shows again once this one ends; off, they keep running underneath. The animation always restarts from its first frame. The action does nothing without a model engine.
The animation plays above the NPC's idle and walk animations and above animations started by the mob's MythicMobs skills. When the model is not there yet, for example at the start of a cinematic in a world that just loaded, the action waits up to 2 seconds for it. It works with ticking on and off. A Mythicmob NPC Stop Animation with an empty name also cancels an animation still waiting for its model.