Snippet Set Unit Maximum HP and Mana

Discussion in 'Systems and Snippets' started by Tom Jones, Jan 24, 2008.

  1. Jesus4Lyf

    Jesus4Lyf Good Idea™

    Ratings:
    +394 / 0 / -0
    Add and remove abilities.

    It's what Bonus does anyway.

    As in... you have a bunch of different +x damage abilities and you add the appropriate ones to get the damage amount you want...
     
  2. BCJoker

    BCJoker New Member

    Ratings:
    +0 / 0 / -0
    I hate world editor so much

    the reason it lags (its almost unbearable if youre trying to import this into an ability) is because youre using the "add ability" function.

    oh my bad i think it only lags the first time you add it?
     
  3. Igor_Z

    Igor_Z You can change this now in User CP.

    Ratings:
    +60 / 0 / -0
    So how did you thought of something like this yourself? It is very hard to calculate this and make it work perfectly when you start working from scratch. Can you tell me who is the original creator of this? He is a true genius using the max hp bug. Explained better here
     
  4. Blood_Wraith

    Blood_Wraith New Member

    Ratings:
    +2 / 0 / -0
    Thanks for the trigger, but how do I calculate the Unit's Max HP and Mana? I'm trying to do it like this:

    Trigger:
    • Set Max_Hp = Max HP of (Triggering Unit) + 5%


    I'm trying to set the Hero's HP/MP to (Current Max Value) + 5%

    How would I do that?
     
  5. MyPad

    MyPad Member

    Ratings:
    +0 / 0 / -0
    Necrobump!

    This system is no longer necessary now that we have the following natives:

    JASS:
    native BlzSetUnitMaxHp takes unit whichUnit, integer newMax returns nothing
    native BlzSetUnitMaxMana takes unit whichUnit, integer newMax returns nothing
     

Share This Page