... | ... | @@ -19,13 +19,13 @@ Attributes |
|
|
|
|
|
#### When remove = false
|
|
|
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|-----------|---------|--------------------------------------------------------------------------------------------|---------|
|
|
|
| speed | sp | Speed multiplier of the state | 1 |
|
|
|
| lerpin | li | Transition tick when the animation starts | 0 |
|
|
|
| lerpout | lo | Transition tick when the animation ends | 1 |
|
|
|
| force | f | Should the animation be played again even if it is already playing | false |
|
|
|
| priority | p, pr | Set the priority of the animation<br/>Only parsed when model is using new animation system | 1 |
|
|
|
| Attribute | Aliases | Description | Default |
|
|
|
|-----------|---------|--------------------------------------------------------------------------------------|---------|
|
|
|
| speed | sp | Speed multiplier of the state | 1 |
|
|
|
| lerpin | li | Transition tick when the animation starts | 0 |
|
|
|
| lerpout | lo | Transition tick when the animation ends | 1 |
|
|
|
| force | f | Should the animation be played again even if it is already playing | false |
|
|
|
| priority | p, pr | Set the priority of the animation.<br/>Only parsed when model is using Hybrid system | 1 |
|
|
|
|
|
|
#### When remove = true
|
|
|
|
... | ... | @@ -37,7 +37,7 @@ Attributes |
|
|
Examples
|
|
|
--------
|
|
|
|
|
|
#### Playing an animation:
|
|
|
#### Playing an animation:
|
|
|
|
|
|
This will play an animation when the mob attacks.
|
|
|
The animation would take 3 ticks to transition in, and another 3 ticks to transition out.
|
... | ... | @@ -47,8 +47,11 @@ Skills: |
|
|
# Play an attack animation that will only play once
|
|
|
- state{mid=kindletronjr;s=attack;li=3;lo=3} @self ~onAttack
|
|
|
```
|
|
|
|
|
|
> Note: In practice, this will only work if your animation has no wind up animation.
|
|
|
> If you want your animation to line up with your attack, you will have to [delay the attack]().
|
|
|
> If you want your animation to line up with your attack, you will have
|
|
|
> to [delay the attack](#syncing-an-animation-with-an-attack).
|
|
|
---
|
|
|
|
|
|
#### Stopping an animation:
|
|
|
|
... | ... | @@ -62,4 +65,58 @@ Skills: |
|
|
- delay 80
|
|
|
# Remove the animation
|
|
|
- state{mid=kindletronjr;s=stunned;r=true} @self
|
|
|
``` |
|
|
\ No newline at end of file |
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
#### Syncing animations with attacks:
|
|
|
|
|
|
As [described above](#playing-an-animation), if you play an attack animation with wind up using the attack trigger,
|
|
|
the animation would look delayed, i.e. "the damaging blow" of the animation is played after the target is damaged.
|
|
|
|
|
|
To fix this, we will have to:
|
|
|
|
|
|
* Cancel the attack event
|
|
|
* Play the animation
|
|
|
* Damage the target manually after a certain delay
|
|
|
|
|
|
```yaml
|
|
|
Skills:
|
|
|
- (wip)
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
#### Overlapping animations:
|
|
|
|
|
|
In some cases, you will want the model to play multiple animations at once. For example, a model holding up
|
|
|
its weapon while doing a charging animation.
|
|
|
|
|
|
By default, the Priority Animation System assign priority to each animation on model import.
|
|
|
Higher priority animations will automatically be applied later. For more information, check out
|
|
|
the [animation system guide](/Technical/Animation-Systems).
|
|
|
|
|
|
```yaml
|
|
|
Skills:
|
|
|
# Play the hold_axe animation, which has a lower priority
|
|
|
- state{mid=kindletronjr;s=hold_axe;li=3;lo=3} @self
|
|
|
# Play the charge animation, which has a higher priority
|
|
|
- state{mid=kindletronjr;s=charge;li=3;lo=3} @self
|
|
|
```
|
|
|
|
|
|
---
|
|
|
|
|
|
#### Overlapping animations using the Hybrid system:
|
|
|
|
|
|
The new Hybrid system no longer assign priority to each animation. Instead, priority is set
|
|
|
based on the `priority` attribute of this mechanic.
|
|
|
|
|
|
```yaml
|
|
|
Skills:
|
|
|
# Play the hold_axe animation, which we assign a lower priority
|
|
|
- state{mid=kindletronjr;s=hold_axe;li=3;lo=3;priority=1} @self
|
|
|
# Play the charge animation, which we assign a higher priority
|
|
|
- state{mid=kindletronjr;s=charge;li=3;lo=3;priority=2} @self
|
|
|
```
|
|
|
|
|
|
--- |
|
|
\ No newline at end of file |