GameEntity::getEntityAnimDuration

From RAGE Multiplayer Wiki
Revision as of 11:47, 2 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Required Params

  • animDict: string - The name of the animation dictionary.
  • animName: string - The name of the animation.

Return value

  • number - The duration of the specified animation in seconds.

Syntax

mp.game.entity.getEntityAnimDuration(animDict, animName)

Example

// Example animation dictionary and name
let animDict = mp.game.joaat("anim@mp_ferris_wheel");
let animName = mp.game.joaat("idle_a");

// Get the duration of the specified animation
let duration = mp.game.entity.getEntityAnimDuration(animDict, animName);
mp.gui.chat.push("Animation Duration: " + duration + " seconds");


See also