BlzFrameSetSpriteAnimate

Parameters
frame framehandle

Frame handle.

primaryProp integer

Animation token ID (not the animation ID), mapped from 0 to 25. This token is matched to animation names in the model. For example: token 2 (Stand) matches Stand - 1, Stand - 2, etc.

Value Token
0 Birth
1 Death
2 Stand
3 Morph
4 Alternate
5 Found
6 MainMenu
7 SinglePlayer
8 SinglePlayerSkirmish
9 Campaign
10 MultiPlayer
11 MultiPlayerPreGameChat
12 ViewReplay
13 BattleNetChatRoom
14 BattleNetCustom
15 BattleNetCustomCreate
16 BattleNetWelcome
17 BattleNetAMM
18 BattleNetAdvancedOptions
19 BattleNetChannel
20 BattleNetProfile
21 BattleNetTeamChat
22 BattleNetUserList
23 Options
24 RealmSelection
25 MainCancelPanel
flags integer

Bitmask controlling queue and animation selection behavior. Pass a single value or a sum of multiple.

Flag Value Description
0 Clears the queue and immediately sets the new animation
1 Adds to queue only if following a NonLooping animation
2 Adds animation to the end of the queue
3 Seems like same as 2. If none of 1–3 is set, queue gets wiped
4 Unknown (seems to do nothing)
8 Selects the first matching animation from the model (the one with the lowest internal ID). By default, if multiple animations share the same token (e.g. Stand - 1, Stand - 2, etc.), one of them is picked at random
16 Selects the least rare animation (lowest Rarity)
32 Selects the rarest animation (highest Rarity)
48 Same as 16
4096 Unknown.
12224 Unknown.
16384 Unknown.
comment

Controls a sprite’s animation queue. Supported frame types: SPRITE, STATUSBAR.

Example (Lua):

local spr

-- Set a Stand animation
BlzFrameSetSpriteAnimate(spr, 2, 0)

-- Set the rarest version of Stand
BlzFrameSetSpriteAnimate(spr, 2, 32)

-- Queue up all 26 animations
-- Note: The queue runs even while the game is paused
for i = 0, 25 do
    BlzFrameSetSpriteAnimate(spr, i, 2)
end

-- Queue only the rarest versions
for i = 0, 25 do
    BlzFrameSetSpriteAnimate(spr, i, 34) -- 2 + 32
end
patch

1.31.0.11889

Source
common.j (suggest an edit or discuss on Github)
return type
nothing
Source code
native BlzFrameSetSpriteAnimate                    takes framehandle frame, integer primaryProp, integer flags returns nothing