• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

How to add abilities into a page

Status
Not open for further replies.
Level 4
Joined
May 12, 2022
Messages
22
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!
 
Level 21
Joined
Aug 29, 2012
Messages
864
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))
 
Level 39
Joined
Feb 27, 2007
Messages
5,062
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:

 
Level 4
Joined
May 12, 2022
Messages
22
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:
Level 39
Joined
Feb 27, 2007
Messages
5,062
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.
Top