Calling an Animation in Visual Studio
-
So I'm fairly new to programming, and I'm trying to call the animation where the player unholsters a weapon. How would I go about referencing the animation? I'm trying to make a mod where a sound plays when equipping a weapon, but I need to tie it to the animation so it doesn't just play when the player presses "Tab."
-
To detect whether an animation is playing or not:
bool IS_ENTITY_PLAYING_ANIM(Entity entity, string animDict, string animName, int taskFlag)
To get the current time of the animation:
float GET_ENTITY_ANIM_CURRENT_TIME(Entity entity, string animDict, string animName)
To play an animation:
PLAY_ENTITY_ANIM
or in SHV .NET:
Game.Player.Character.Task.PlayAnimation(...)