const npc = this.entity.as(npcs.Npc);
npc.tryGetPlayer().then((player) =>
{
player?.playAvatarGripPoseAnimationByName(AvatarGripPoseAnimationNames.Fire);
});
From the NPC's entity, cast it to an NPC type. You can then use "tryGetPlayer()" to get the player (or not!). Note this is a promise so you'll have to call ".then" to do some action when the function has done its asynchronous work.
This player will have the "playAvatarGripPoseAnimationByName" function with which you can trigger these animations. Instead of remembering the string names, use the AvatarGripPoseAnimationNames enum and use its discrete set of values.
Also my advice would be to cache this player at the start so you don't have to use this promise each time you want to trigger the anim
https://developers.meta.com/horizon-worlds/learn/documentation/create-for-web-and-mobile/typescript-apis-for-mobile/player-animations