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

decrease unit mana by action?

Not open for further replies.
Level 4
Nov 25, 2010
have anyone played raijin in dota? well if you dont, his skill is travelling to targeted area by lightning speed. It cost no mana, but after the unit reach the targeted area, his mana will be decreased as far as his distance. So the mana will be decrease bases on how far he travelled

can i decrease unit mana by action trigger? if can, tell me how to to that..
thanks b4 :grin::grin:
Level 13
Jun 1, 2008
Use the ability 'Item Mana Bonus'
Set 2 levels. Set mana bonus on level 1 to 1, on level 2 to 0.

Then via triggers:
Add the ability
Set level of ability to 2
Remove the ability

Then the unit has permanently +1 mana.

To make this more efficient create spells with +1, +2, +4 etc..
Level 33
Mar 27, 2008
For clearer view, here is it:

  • Unit - Set mana of (Triggering unit) to ((Mana of (Triggering unit)) - (Distance x ConstantValueForDecreasingMana))
Something like that, the formula is just CurrentMana - ManaUsed = SetCurrentManaOfUnit

You should see a function that "Reduce Mana of Unit" but instead, Blizzard provide "Set Mana of Unit" where you can set it by using your own formula, equal to "Reduce Mana of Unit" function :)

Just, math.
Not open for further replies.