• 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.

decrease unit mana by action?

Status
Not open for further replies.
Level 4
Joined
Nov 25, 2010
Messages
59
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
Joined
Jun 1, 2008
Messages
360
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
Joined
Mar 27, 2008
Messages
8,035
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.
 
Status
Not open for further replies.
Top