[JASS]Units Attack animations

Status
Not open for further replies.
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.
Back
Top