Actor Animation¶
文档版本:1.21.50.25
The RP animation that changes an actors models, or molang data.
架构¶
actor_animation:
{
string "format_version" : opt
object "animations" : opt
{
object "^animation\.[a-z\.]+" : opt
{
0 "anim_time_update"
number "animation_length" : opt
0 "blend_weight"
object "bones" : opt
{
object "<any object property>" : opt
{
array "position" : opt
{
0 "0..0"
0 "1..1"
0 "2..2"
}
object "position" : opt
{
0 "^(\d+\.\d+|\d+)$"
array "^(\d+\.\d+|\d+)$" : opt
object "^(\d+\.\d+|\d+)$" : opt
{
string "lerp_mode" : opt
array "pre" : opt
array "post" : opt
}
}
array "rotation" : opt
{
0 "0..0"
0 "1..1"
0 "2..2"
}
object "rotation" : opt
{
0 "^(\d+\.\d+|\d+)$"
array "^(\d+\.\d+|\d+)$" : opt
object "^(\d+\.\d+|\d+)$" : opt
{
string "lerp_mode" : opt
array "pre" : opt
array "post" : opt
}
}
object "relative_to" : opt
{
string "rotation" : opt
}
0 "scale"
array "scale" : opt
{
0 "0..0"
0 "1..1"
0 "2..2"
}
object "scale" : opt
{
0 "^(\d+\.\d+|\d+)$"
array "^(\d+\.\d+|\d+)$" : opt
object "^(\d+\.\d+|\d+)$" : opt
{
string "lerp_mode" : opt
array "pre" : opt
array "post" : opt
}
}
}
}
boolean "loop" : opt
string "loop" : opt
0 "loop_delay"
boolean "override_previous_animation" : opt
object "particle_effects" : opt
{
object "^(\d+\.\d+|\d+)$" : opt
{
string "effect" : opt
string "locator" : opt
0 "pre_effect_script"
boolean "bind_to_actor" : opt
}
array "^(\d+\.\d+|\d+)$" : opt
{
object "<any array element>" : opt
{
}
}
}
0 "start_delay"
object "sound_effects" : opt
{
object "^(\d+\.\d+|\d+)$" : opt
{
string "effect" : opt
}
array "^(\d+\.\d+|\d+)$" : opt
{
object "<any array element>" : opt
{
}
}
}
object "timeline" : opt
{
string "^(\d+\.\d+|\d+)$" : opt
array "^(\d+\.\d+|\d+)$" : opt
{
string "<any array element>" : opt
}
}
}
}
}
format_version
:string
animations
:object- The animation specification.
animations
^animation\.[a-z\.]+
:object- The animation specification.
^animation\.[a-z\.]+
anim_time_update
:0- How does time pass when playing the animation. Defaults to
query.anim_time + query.delta_time
which means advance in seconds.
animation_length
:number- Override calculated value (set as the last keyframe time) and set animation length in seconds.
blend_weight
:0- The weight of the animation when blending with other animations. Defaults to 1.
bones
:object- Defines how the bones in an animation move or transform.
bones
<any object property>
:object- The bone definition that declare how it transforms during animation.
<any object property>
position
:array- An array of 3 items that describe the bones position.
position
0..0
:0- The position over the X-axis or forwards/backwards. Can be molang or a float
1..1
:0- The position over the Y-axis, or up/down. Can be molang or a float
2..2
:0- The position over the Z-axis, or left/right. Can be molang or a float
position
:object- The Position transformation during this animation.
position
^(\d+\.\d+|\d+)$
:0- Uniform position.
^(\d+\.\d+|\d+)$
:array- An array of 3 items that describe the bones position.
^(\d+\.\d+|\d+)$
^(\d+\.\d+|\d+)$
:object- A single point in time.
^(\d+\.\d+|\d+)$
lerp_mode
:string- UNDOCUMENTED.
pre
:array- An array of 3 items that describe the bones position.
pre
post
:array- An array of 3 items that describe the bones position.
post
rotation
:array- An array of 3 items that describe the bones rotation.
rotation
0..0
:0- The rotation over the X-axis, or up or down. Can be molang or a float
1..1
:0- The rotation over the Y-axis, or yaw. Can be molang or a float
2..2
:0- The rotation over the Z-axis, or roll. Can be molang or a float
rotation
:object- The rotation transformation during this animation.
rotation
^(\d+\.\d+|\d+)$
:0- Uniform rotation.
^(\d+\.\d+|\d+)$
:array- An array of 3 items that describe the bones rotation.
^(\d+\.\d+|\d+)$
^(\d+\.\d+|\d+)$
:object- A single point in time.
^(\d+\.\d+|\d+)$
lerp_mode
:string- UNDOCUMENTED.
pre
:array- An array of 3 items that describe the bones rotation.
pre
post
:array- An array of 3 items that describe the bones rotation.
post
relative_to
:object- If set, makes the bone rotation relative to the entity instead of the bone's parent.
relative_to
rotation
:string- If set, makes the bone rotation relative to the entity instead of the bone's parent.
scale
:0- Uniform scale.
scale
:array- An array of 3 items that describe the bones scale.
scale
0..0
:0- The scale over the X-axis or forwards/backwards. Can be molang or a float
1..1
:0- The scale over the Y-axis, or up/down. Can be molang or a float
2..2
:0- The scale over the Z-axis, or left/right. Can be molang or a float
scale
:object- UNDOCUMENTED.
scale
^(\d+\.\d+|\d+)$
:0- Uniform rotation.
^(\d+\.\d+|\d+)$
:array- An array of 3 items that describe the bones scale.
^(\d+\.\d+|\d+)$
^(\d+\.\d+|\d+)$
:object- A single point in time.
^(\d+\.\d+|\d+)$
lerp_mode
:string- UNDOCUMENTED.
pre
:array- An array of 3 items that describe the bones scale.
pre
post
:array- An array of 3 items that describe the bones scale.
post
loop
:boolean- Should this animation stop, loop, or stay on the last frame when finished (true, false, hold_on_last_frame).
loop
:string- Should this animation stop, loop, or stay on the last frame when finished (true, false, hold_on_last_frame).
loop_delay
:0- How long to wait in seconds before looping this animation. Note that this expression is evaluated after each loop and on looping animation only.
override_previous_animation
:boolean- Reset bones in this animation to the default pose before applying this animation.
particle_effects
:object- UNDOCUMENTED.
particle_effects
^(\d+\.\d+|\d+)$
:object- A single point in time.
^(\d+\.\d+|\d+)$
effect
:string- The name of a particle effect that should be played.
locator
:string- The name of a locator on the actor where the effect should be located.
pre_effect_script
:0- A molang script that will be run when the particle emitter is initialized.
bind_to_actor
:boolean- Set to false to have the effect spawned in the world without being bound to an actor (by default an effect is bound to the actor).
^(\d+\.\d+|\d+)$
:array- A single point in time.
^(\d+\.\d+|\d+)$
<any array element>
:object
<any array element>
start_delay
:0- How long to wait in seconds before playing this animation. Note that this expression is evaluated once before playing, and only re-evaluated if asked to play from the beginning again. A looping animation should use
loop_delay
if it wants a delay between loops.
sound_effects
:object- UNDOCUMENTED.
sound_effects
^(\d+\.\d+|\d+)$
:object- A single point in time.
^(\d+\.\d+|\d+)$
effect
:string- Valid sound effect names should be listed in the entity's resource_definition json file.
^(\d+\.\d+|\d+)$
:array- A single point in time.
^(\d+\.\d+|\d+)$
<any array element>
:object
<any array element>
timeline
:object- The time line.
timeline
^(\d+\.\d+|\d+)$
:string- Variable definition.
^(\d+\.\d+|\d+)$
:array
^(\d+\.\d+|\d+)$
<any array element>
:string- Variable definition.