• 🏆 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!

Ability has another ability ?

Status
Not open for further replies.
Level 2
Joined
Dec 24, 2011
Messages
7
Sorry for asking this guys how to make custom ability with life and mana movement or attack speed for example : i create a custom ability using unholy aura it shows movement speed and hitpoints regeneration but i need mana regeneration for that custom ability how do i do that ? does it need triggering ?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
The ability bases are hardcoded and have specific effects. 'Unholy Aura' shows no "mana bonus" field because it does not use such. It also has no modulary "apply freely selected ability/effect" to the targets. Take an ability with the fitting effects or search for other ways like a combination of different abilities and ofc triggers can help there or you can realize certain stuff via them directly.

It all depends on what you want exactly. And I tell you: To effectively create maps, you need a broad knowledge of all sorts of wc3's mechanics. Triggers are not something you should avoid.
 
Level 6
Joined
Jan 6, 2006
Messages
204
I quickly put together some GUI functions. I haven't touched GUI in 5 years so there might be a thing I overlooked.

  • Frostmourne
    • Events
      • Unit - A unit Learns a skill
    • Conditions
    • Actions
      • Custom script: set udg_tempUnit = GetTriggerUnit()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Thunder Clap for tempUnit) Equal to 1
        • Then - Actions
          • Unit - Add Critical Strike to tempUnit
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Thunder Clap for tempUnit) Greater than 1
            • Then - Actions
              • Unit - Set level of Critical Strike for tempUnit to (Level of Thunder Clap for tempUnit)
            • Else - Actions
      • Custom script: set udg_tempUnit = null
in your variable editor create a new variable called tempUnit as type unit

As you may notice, the first condition also goes into the 'then' tree even if a different ability was leveld up as long as Thunder Clap stays on level 1. Luckily for us, you cannot add multiple instances of the same spell to a unit. So we don't have to run further checks if Thunder Clap was the actual ability leveld up.
If Thunder Clap and thus the secondary ability was already added, it will get its level set to the same level of your base spell ( Thunder Clap ).

Put this trigger inside your map, create a mountain king and level up his second ability to see the effect. I intentionally didn't add a bonus hit point regeneration as item abilities are not shown in the units user interface.

with the last call the memory ( unit handle ) is set to null to prevent building up memory.

Task for you is now to exchange thunder clap with frostmourne and critical strike with your hit point regeneration.

Off-topic:

If your unit ever gets its abilities reset with for example of tome of retraining you have to check for this event, because the triggered bonus ability will not be forgotten or reset to level 1.
 
Status
Not open for further replies.
Top