• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Spell] Get mana cost of an ability

Level 6
Joined
May 13, 2023
Messages
72
so I have a simple custom aura that basically does this. If an unit under effects of the aura casts any ability, it will heal it self for the amount of mana cost of the ability. The trigger below does work but it is very inconsistent as the amount healed keeps showing up random or sometimes as nothing.
  • Ascension Aura
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Triggering unit) has buff Ascension Aura ) Equal to True
    • Actions
      • Set VariableSet AscensionAuraCaster = (Triggering unit)
      • Set VariableSet AscensionAuraPOS = (Position of AscensionAuraCaster)
      • Set VariableSet AscensionAuraValue = (0.50 x (Real((Mana cost of (Ability being cast), Level (Level of (Ability being cast) for AscensionAuraCaster).))))
      • Unit - Set life of AscensionAuraCaster to ((Life of AscensionAuraCaster) + AscensionAuraValue)
      • Floating Text - Create floating text that reads (+ + (String(AscensionAuraValue, 3, 0))) above AscensionAuraCaster with Z offset 0.00, using font size 10.00, color (0.00%, 100.00%, 50.00%), and 0.00% transparency
      • Floating Text - Change (Last created floating text): Disable permanence
      • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
      • Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds
      • Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
      • Special Effect - Create a special effect at AscensionAuraPOS using Abilities\Spells\Other\ANrm\ANrmTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_AscensionAuraPOS)
 
Last edited:
Top