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

[Solved] Trigger Mana Burn not working(Prob math issue)

Status
Not open for further replies.
Level 7
Joined
Apr 12, 2011
Messages
124
Trigger not working :/ don't see what bugs, anyone see it?
it's supposed to burn 10%/15%/20% of the targets mana but it doesn't burn any mana at all.


  • -------- Mana Burn Customise --------
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ThunderLvl Equal to 1
    • Then - Actions
      • -------- Change This --------
      • Set WS_Manaburn = 10
    • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ThunderLvl Equal to 2
        • Then - Actions
          • -------- Change This --------
          • Set WS_Manaburn = 15
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ThunderLvl Equal to 3
            • Then - Actions
              • -------- Change This --------
              • Set WS_Manaburn = 20
            • Else - Actions
  • -------- Mana Burn --------
  • Set WS_BurnedMana = ((Integer((Max mana of (Picked unit)))) - ((Integer((Max mana of (Picked unit)))) / ((Integer(100.00)) x WS_Manaburn)))
  • Unit - Set mana of (Picked unit) to (Real(WS_BurnedMana))
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Your formula makes no sense?

It should be
Current mana = current mana - ( max mana * percentagemultiplayer )

What you are doing maks no sense as you will get....
current mana = maxmana - ( maxmana / (100*mana burn) )
A simple test run will show that
current mana = maxmana - ( maxmana / 1000 ) which is like only a few mana less. You also fail to take into account the unit not starting with maximum mana and it will recharge the target if it had less that the calculated amount. Also as you level the skill up it will rechage the target more and more (closer to maximum).

Pay attention to maths at school, they do teach it to you for reasons like this.
 
Level 7
Joined
Apr 12, 2011
Messages
124
Your formula makes no sense?

It should be
Current mana = current mana - ( max mana * percentagemultiplayer )

What you are doing maks no sense as you will get....
current mana = maxmana - ( maxmana / (100*mana burn) )
A simple test run will show that
current mana = maxmana - ( maxmana / 1000 ) which is like only a few mana less. You also fail to take into account the unit not starting with maximum mana and it will recharge the target if it had less that the calculated amount. Also as you level the skill up it will rechage the target more and more (closer to maximum).

Pay attention to maths at school, they do teach it to you for reasons like this.

i got confused with all the text and numbers :C and math never was my thing. Anyhow, i figured the solution out 5 min ago but ty for pointing it out.
 
Level 5
Joined
Nov 17, 2010
Messages
28
  • Event
  • Unit - A unit starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Mana burn
  • Actions
  • Set MB_Mana = (0.05 + (0.05x (Real((Level of (Ability veing cast) for (Triggering unit))))))
  • Special effect - Create a special effect at (Position of (Target unit of ability being cast)) using Aibilities/Spells/NighElf/Blink/BlinkCaster.mdl
  • Special effect - Destroy (Last created special effect)
AND CONTINUE, YOU CAN SEE ON THE UPLOADED MAP

I make two spells, mana burn, and mana burn with Area of Effect for you, if you want information, sendme a mp.

Good Luck! :ogre_hurrhurr:
 

Attachments

  • Mana Burn.w3x
    21.9 KB · Views: 56
Last edited by a moderator:
Status
Not open for further replies.
Top