... | @@ -14,3 +14,29 @@ Use the generated resource pack, located in the plugin's folder. |
... | @@ -14,3 +14,29 @@ Use the generated resource pack, located in the plugin's folder. |
|
|
|
|
|
### Model using parts of a different model
|
|
### Model using parts of a different model
|
|
Update the resource pack.
|
|
Update the resource pack.
|
|
|
|
|
|
|
|
|
|
|
|
### I want my Modeled Entity to perform a custom attack animation
|
|
|
|
While you could play a state with a onAttack trigger, there will be no delay between the start of the attack animation and the damage itself, so a different solution is required.
|
|
|
|
A popular and effective method is to:
|
|
|
|
- Cancel the attack event
|
|
|
|
- Play the state
|
|
|
|
- Delay the execution of the skilltree
|
|
|
|
- Deal Damage
|
|
|
|
|
|
|
|
And this is usually done via the use, in some form, of the following base metaskill:
|
|
|
|
```yaml
|
|
|
|
ExampleMob:
|
|
|
|
Type: ZOMBIE
|
|
|
|
Skills:
|
|
|
|
- model{mid=examplemob} @self ~onSpawn
|
|
|
|
- skill{s=ExampleModelAttack;sync=true} @self ~onAttack
|
|
|
|
```
|
|
|
|
```yaml
|
|
|
|
ExampleModelAttack:
|
|
|
|
Skills:
|
|
|
|
- cancelevent
|
|
|
|
- state{...}
|
|
|
|
- delay 17
|
|
|
|
- damage{...} @trigger
|
|
|
|
``` |
|
|
|
\ No newline at end of file |