• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Set Unit Animation

Status
Not open for further replies.
JASS:
SetUnitAnimation(unit whichUnit, string whichAnimation)

SetUnitAnimationByIndex(unit whichUnit, integer whichAnimation)

ResetUnitAnimation(unit whichUnit)
-> SetUnitAnimation(unit whichUnit, "stand")

QueueUnitAnimation(unit whichUnit, string whichAnimation)

SetUnitAnimationWithRarity(unit whichUnit, string whichAnimation, raritycontrol rarity)
 
Kobas you are fast.

Maybe i should down their API in the j files.

JASS:
native          QueueUnitAnimation          takes unit whichUnit, string whichAnimation returns nothing

native          SetUnitAnimation            takes unit whichUnit, string whichAnimation returns nothing

native          SetUnitAnimationByIndex     takes unit whichUnit, integer whichAnimation returns nothing

native          SetUnitAnimationWithRarity  takes unit whichUnit, string whichAnimation, raritycontrol rarity returns nothing

native          AddUnitAnimationProperties  takes unit whichUnit, string animProperties, boolean add returns nothing

If you want destructables
JASS:
native          QueueDestructableAnimation  takes destructable d, string whichAnimation returns nothing

native          SetDestructableAnimation    takes destructable d, string whichAnimation returns nothing

native          SetDestructableAnimationSpeed takes destructable d, real speedFactor returns nothing

Doodads
JASS:
native SetDoodadAnimation       takes real x, real y, real radius, integer doodadID, boolean nearestOnly, string animName, boolean animRandom returns nothing

native SetDoodadAnimationRect   takes rect r, integer doodadID, string animName, boolean animRandom returns nothing

Blizzard slow API version
JASS:
function SetDoodadAnimationBJ takes string animName, integer doodadID, real radius, location center returns nothing

    call SetDoodadAnimation(GetLocationX(center), GetLocationY(center), radius, doodadID, false, animName, false)

endfunction



//===========================================================================

function SetDoodadAnimationRectBJ takes string animName, integer doodadID, rect r returns nothing

    call SetDoodadAnimationRect(r, doodadID, animName, false)

endfunction



//===========================================================================

function AddUnitAnimationPropertiesBJ takes boolean add, string animProperties, unit whichUnit returns nothing

    call AddUnitAnimationProperties(whichUnit, animProperties, add)

endfunction

function ResetUnitAnimation takes unit whichUnit returns nothing

    call SetUnitAnimation(whichUnit, "stand")

endfunction
 
Status
Not open for further replies.
Top