Skip to content

AnimationStats is the base class for animation behavior of GameObjects.

Instance Variables

aerialFriction

Type

Float

Initial Value

-1

Description

Aerial friction override for this animation. Resorts to default aerialFriction GameObject stat when set to a negative value.

aerialSpeedAcceleration

Type

Float

Initial Value

-1

Description

Air speed acceleration override for this animation. Resorts to default aerialSpeedAcceleration GameObject stat when set to a negative value.

aerialSpeedCap

Type

Float

Initial Value

-1

Description

Maximum air speed limit override for this animation. Resorts to default aerialSpeedCap GameObject stat when set to a negative value.

attackId

Type

Int

Initial Value

0

Description

Not to be set directly - unique attackId for the attack

autoRotate

Type

Bool

Initial Value

false

Description

If true, the entity's body rotates to match momentum.

bodyStatus

Type

BodyStatus

Initial Value

BodyStatus.NONE

Description

Override's the BodyStatus of the Entity for the duration of the animation.

bodyStatusStrength

Type

Float

Initial Value

0

Description

If BodyStatus is in the DAMAGE_ARMOR, DAMAGE_RESISTANCE, LAUNCH_ARMOR, or LAUNCH_RESISTANCE states, then this controls the damage and velocity thresholds for each respective status.

chargeFramesMax

Type

Int

Initial Value

0

Description

Maximum number of frames the animation can be charged for. Setting this value to zero will disable charge incrementing

chargeFramesTotal

Type

Int

Initial Value

0

Description

Total number of frames the animation has been charged for

colorAdjustableBodyStatuses

Type

BodyStatus

Initial Value

BodyStatus.ALL

Description

Chooses which body statuses are allowed to change the GameObject color.

endType

Type

AnimationEndType

Initial Value

AnimationEndType.AUTO

Description

Defines how the engine should handle the completion of this animation @see AnimationEndType

friction

Type

Float

Initial Value

-1

Description

Ground friction override for this animation. Resorts to GameObject friction stat when set to a negative value.

grabLimit

Type

Int

Initial Value

1

Description

Limit of the amount of objects that can be grabbed during this animation

gravityMultiplier

Type

Float

Initial Value

1

Description

Multiplier that is applied to the object's gravity value

groundSpeedAcceleration

Type

Float

Initial Value

-1

Description

Ground speed acceleration override for this animation. Resorts to default groundSpeedAcceleration GameObject stat when set to a negative value.

groundSpeedCap

Type

Float

Initial Value

-1

Description

Maximum ground speed limit override for this animation. Resorts to default groundSpeedCap GameObject stat when set to a negative value.

immovable

Type

Bool

Initial Value

false

Description

Immovable animations do not take knockback from windboxes and cannot be pushed by other solid objects, but may still push other movable solid objects.

interruptible

Type

Bool

Initial Value

false

Description

Allows the animation to be counted as a free state. Note that modifying this value directly will bypass any special rules surrounding interruptibility (i.e. IASA that relies on external conditions).

landAnimation

Type

String

Initial Value

null

Description

If non-null, the name of the animation that will be jumped to when the object transitions from air to ground, regardless of landType If null, the engine will use a land animation based on the landType

landType

Type

LandType

Initial Value

LandType.NORMAL

Description

Determines the behavior of the object when it transitions from air to ground. @see: LandType

leaveGroundCancel

Type

Bool

Initial Value

true

Description

If enabled the entity will have their animation canceled if they transition from grounded to aerial. @deprecated Characters can use leaveGroundType instead

metadata

Type

Dynamic

Initial Value

null

Description

Metadata passed into the attack

name

Type

String

Initial Value

null

Description

The name of the attack animation.

nextAnimation

Type

String

Initial Value

null

Description

Used in conjunction with AnimationEndType.AUTO. If provided, when the animation ends, the entity's animation will be changed to this value

nextState

Type

Int

Initial Value

-1

Description

Used in conjunction with AnimationEndType.AUTO. If provided, when the animation ends, the entity's state will be changed to this value

pause

Type

Bool

Initial Value

false

Description

When set to true, animation playback is halted on the current frame.

resetId

Type

Bool

Initial Value

true

Description

When true, the current AnimationStats attackId will be reset on the first frame.

resetRotation

Type

Bool

Initial Value

n/a

Description

When true, the rotation of the object will be reset on the first frame.

rotationSpeed

Type

Float

Initial Value

n/a

Description

When a non-zero value, the object will rotate at the specified speed. Positive values will rotate clockwise, while negative values will rotate counter-clockwise. Note that if the object is flipped horizontally, the direction of the rotation will also be flipped.

shadows

Type

Bool

Initial Value

true

Description

Whether or not to enable shadows on this particular animation

slideOff

Type

Bool

Initial Value

false

Description

Whether or not the character can slide off the edge of a floor.

solid

Type

Bool

Initial Value

true

Description

Set to true and the object will push other solid animations when hurtboxes overlap, unless those objects are immovable or non-solid.

storedChargePercent

Type

Float

Initial Value

0

Description

Not to be set directly - tracks the previously stored charge percentage

terminalVelocity

Type

Float

Initial Value

-1

Description

Terminal velocity override for this animation. Resorts to default terminalVelocity GameObject stat when set to a negative value.

xSpeedConservation

Type

Float

Initial Value

1

Description

Percentage of non-KB X Speed kept on frame 1

ySpeedConservation

Type

Float

Initial Value

1

Description

Percentage of non-KB Y Speed kept on frame 1