• 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.

[JASS]Units Attack animations

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
JASS
JASS:
function Trig_Untitled_Trigger_023_Conditions takes nothing returns boolean
    // Change the ratf to your item type
    return GetItemTypeId(GetManipulatedItem()) == 'ratf'
endfunction

function Trig_Untitled_Trigger_023_Actions takes nothing returns nothing
    call AddUnitAnimationProperties(GetTriggerUnit() , "Alternate" , true)
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_023 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_023 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Untitled_Trigger_023, EVENT_PLAYER_UNIT_PICKUP_ITEM )
    call TriggerAddCondition( gg_trg_Untitled_Trigger_023, Condition( function Trig_Untitled_Trigger_023_Conditions ) )
    call TriggerAddAction( gg_trg_Untitled_Trigger_023, function Trig_Untitled_Trigger_023_Actions )
endfunction

GUI
  • Untitled Trigger 023
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Custom script: call AddUnitAnimationProperties(GetTriggerUnit() , "Alternate" , true)
 
Status
Not open for further replies.
Top