• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] Last Added Spell

Status
Not open for further replies.
Store the ability Id on a global variable. If you know jass, it's like this.

JASS:
globals
    integer LastAddedAbility=0
endglobals

constant function GetLastAddedAbility takes nothing returns integer
    return LastAddedAbility
endfunction

function AddAbilityToDummy takes unit dummy, integer abilityId returns nothing
    set LastAddedAbility=abilityId
    call UnitAddAbility(dummy,abilityId)
endfunction
 
Not the order but the rawcode (an example is 'A000') of the ability you're adding to the dummy.
 
Rawcode's aren't random, they are unique for every ability. I really don't understand what you want to do could you clarify it.
 
Because you're not supposed to use the script, its purpose is to provide the general idea of doing that.
 
Status
Not open for further replies.
Back
Top