• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Spell] Get a unit ability

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
Pretty much you have to pre-set variable those abilities first and then retrieve it later on.
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set MountainKing[1] = Ability 1
      • Set MountainKing[2] = Ability 2
      • Set MountainKing[3] = Ability 3
      • Set MountainKing[4] = Ability 4
Then;
  • Melee Initialization
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Unit - Increase level of MountainKing[1] for (Triggering unit)
This will increase your Mountain King first ability (you must set correctly for each variable = Ability).
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
There is no way to get the ability BY SLOT.
There is, but you have to pre-set it (look at my previous post).

There is a way to get what ability has been casted but this is not related to your problem at all.

What you want is to get unit ability from its... coordinates of UI ??? Impossible without tricks, because there is no function such as GetUnitAbilitySlotUI or whatever.
 
Status
Not open for further replies.
Top