How to add abilities into a page

Status
Not open for further replies.
Level 4
Joined
May 12, 2022
Messages
24
I'm trying to add an ability into a page like the build tab (it can be any tab).. even though I don't yet have a system for multiple pages of abilities, I want to know if what I'm trying to do is achivable with GUI triggers.

This trigger bellow will add an ability into a unit's tabs after it has purchased a certain item.

  • Shop units
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Unit - Add ASDF to (Triggering unit)
      • Item - Remove (Item being manipulated)
1671311649299.png


Basically what I need is a way to somehow add the ability into a unit's page/build tab after said unit has purchased a certain item.
Also if you know a better way to trigger this please let me know.

Thanks!
 
For regular abilities, you trigger will most likely work, but to add buildings inside the construction menu, I think you will need to use something like this (after having disabled whatever building in a first place)

  • Player - Make Altar of Kings Available for training/construction by (Owner of (Triggering unit))
 
The only way to get a spell inside a build menu is to collide a spellbook’s order string with the build menu order string as described in this thread:

 
The thing is .. I need to add the ability only after the unit has made the purchase, not before.
And as I said, it doesn't have to be specifically the build tab (construction menu). It can also be a costom page that acts similar to this:

1671358750277.png
1671356793325-png.415855
(the shop form Warlock) Warlock 1.01b

Now, I want to know if it's actually possible to add an ability to a unit into either of these tabs after the game started and the said unit buys a specific item.


Thanks for your replies!
 
Last edited:
Abilities can now be disabled on a per-unit basis. Enable and disable that ability for that specific unit when you need to.
  • Events
    • Unit - A unit enters Playable Map Area
  • Conditions
    • (Unit-type of (Triggering Unit)) equal to YOUR_TYPE
  • Actions
    • Unit - For (Triggering Unit) ability YOUR_ABILITY, Disable: True, Hide UI: False //the line is something like this, it's super awkwardly worded
  • Shop units
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
    • Actions
      • Unit - For (Triggering Unit) ability YOUR_ABILITY, Disable: False, Hide UI: False
      • Item - Remove (Item being manipulated)
This only exists in relatively recent wc3 patches. If you are someone who refuses to update then you simply cannot do this at all (can only be done on a per-player basis before this functionality was introduced).
 
Status
Not open for further replies.
Back
Top