{{tag>animation part}}
===== Animation =====
== Description ==
The animation part allows you to play in-game animations on your playermodel or ragdolls. If you're looking for custom animations see [[:part:custom-animation]].
== Location ==
This part can be found under:
* :entity: **Entity** > [[part:animation:]]
* :model: **Model** > [[part:animation:]]
* :poseparameter: **Modifiers** > [[part:animation:]]
== Tip ==
You can easily find it by clicking on the {{:icon:editor:add.png?nolink|}} sign and typing //**projectile**//.
== Notes ==
* When [[#rate]] is set above **1**, [[#ping pong loop]] is disabled, this also causes some weird desync which can be fixed with [[#owner cycle]].
* [[#Rate]] set to **1** + [[#owner cycle]] disables animation looping.
* [[#Owner cycle]] disables all the other options except for [[#rate]].
* Setting the [[#min]] value above [[#max]] breaks the animation part, you might have to re-add it.
* The [[part:legacy_entity#animation rate]] on the [[part:legacy_entity]] part also affects animation rate.
----
{{ :tutorial:part_thumbnails:animation.mp4}}
==== Basic usage: ====
- Add the [[part:animation:]] part to your entity or a ragdoll.
- Select the animation that you want to play by clicking **''...''** next to **[[#sequence name]]**.
- Tweak the settings to your liking.
----
==== Related commands: ====
|pac_enable_animation| 1/0 (1) | Enables/Disables the animation part. |
----
==== Properties ====
* [[#tab-list|List View]]
* [[#tab-table|Table View]]
===Generic===
== loop ==
Doesn't seem to do anything. (label_broken?) (label_moreinfo).
== ping pong loop ==
Instead of going back to frame 1 when starting a new loop, inverts the animations and plays it from end to start.
== sequence name ==
The animation sequence that you want to play.
== rate ==
The animation rate. Default is **1**. Changing this duplicates outfit parts/creates desync, which can be fixed with [[#owner cycle]]. (label_broken?)
== offset ==
Offsets the animation.
== min ==
Controls the start frame of the animation where **0** is the first frame and **1** is the last frame. Values below **0** add delay before the animation starts. Setting this above [[#max]] completely breaks the part.
== max ==
Controls the end frame of the animation where **0** is the first frame and **1** is the last frame. Values above **1** add delay after the animation ends (before starting the next loop).
== weapon hold type ==
(label_moreinfo)
== owner cycle ==
Matches the owners animation cycle. This disables all other settings except for [[#rate]].
== invert frames ==
Inverts the animation.
== reset on hide ==
Resets the animation when hidden.
== name ==
The name of this part. Keep this unique.
== hide ==
Hides (disables) the part.
===Orientation===
== parent name ==
Parent of this part.
^generic^^
|**{{anchor:loop}}[[#loop]]** | Doesn't seem to do anything. (label_broken?) (label_moreinfo) |
|**{{anchor:ping-pong-loop}}[[#ping pong loop]]**| Instead of going back to frame 1 when starting a new loop, inverts the animations and plays it from end to start. |
|**{{anchor:sequence-name}}[[#sequence name]]**| The animation sequence that you want to play. |
|**{{anchor:rate}}[[#rate]]**| The animation rate. Default is **1**. Changing this duplicates outfit parts/creates desync, which can be fixed with [[#owner cycle]]. (label_broken?) |
|**{{anchor:offset}}[[#offset]]**| Offsets the animation. |
|**{{anchor:min}}[[#min]]**| Controls the start frame of the animation where **0** is the first frame and **1** is the last frame. Values below **0** add delay before the animation starts. Setting this above [[#max]] completely breaks the part. |
|**{{anchor:max}}[[#max]]**| Controls the end frame of the animation where **0** is the first frame and **1** is the last frame. Values above **1** add delay after the animation ends (before starting the next loop). |
|**{{anchor:weapon-hold-type}}[[#weapon hold type]]**| (label_moreinfo) |
|**{{anchor:owner-cycle}}[[#owner cycle]]**| Matches the owners animation cycle. This disables all other settings except for [[#rate]]. |
|**{{anchor:invert-frames}}[[#invert frames]]**| Inverts the animation. |
|**{{anchor:reset-on-hide}}[[#reset on hide]]**| Resets the animation when hidden. |
|**{{anchor:name}}[[#name]]**| The name of this part. Keep this unique. |
|**{{anchor:hide}}[[#hide]]**| Hides (disables) the part. |
^orientation^^
|**{{anchor:parent-name}}[[#parent name]]**| Parent of this part. |