1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Join the 6th Melee Mapping Contest for a chance to have your map featured in this year's Hive Cup!
    Dismiss Notice
  4. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  5. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  6. Weave light to take you to your highest hopes - the 6th Special Effect Contest is here!
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[General] How to set damage of a unit on % hp like this?

Discussion in 'World Editor Help Zone' started by [E]clipse, Jul 27, 2015.

  1. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    562
    Resources:
    0
    Resources:
    0
    I want a units damage to be something like :

    Every 2% of missing hp of "SuperUnitX " grants him 1 damage. How do I do this ?

    I dont want to exceed my limit of 10 Levels for hidden abilities.

    I will be really grateful and +rep the one who solves this problem.
     
  2. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,846
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    use Bonus Mod of some sort(CSS, BonusMod or other). And by that, you can set damage to anything you want(up to certain bound of course)
     
  3. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,887
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    I'll just make a link to edo's Custom Stat System (CSS) That He mentioned, definitely not his. definitely. Absolutely. No doubt.
     
    Last edited: Jul 27, 2015
  4. edo494

    edo494

    Joined:
    Apr 16, 2012
    Messages:
    3,846
    Resources:
    5
    Spells:
    1
    JASS:
    4
    Resources:
    5
    its not mine :D(yea you mean link to what I say)
     
  5. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,887
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    Yes.
     
  6. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    562
    Resources:
    0
    Resources:
    0
    Once I've got the bonus mod, what do I do? say its CSS then ?
     
  7. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,887
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    BonusMod Does the Exact thing as CSS.
     
  8. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    Add your SuperUnitX to a group.
    All units inside that group have that ability (probably will be a very empty group with either 1 or 0 members but still).
    Every 0.5-1.0 seconds of gametime (you can decide what number you want but dont use a value below 0.5 or higher than 1.0), you loop through all units of the group.
    You calculate how much bonus damage they should gain and set the bonusdamage from the BonusMod to that amount.
     
  9. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    562
    Resources:
    0
    Resources:
    0
    Lets say Im using CSS (which I am using) So what exact triggers will I need and will my map be openable in both JNGP and the default editor ? (I kind of like the default editor)
     
  10. Arad MNK

    Arad MNK

    Joined:
    Dec 11, 2014
    Messages:
    1,887
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    Read the Instruction Trigger. It says in somewhere in the JASS trigger. It's related to //!textmarco thingies.
     
  11. Daffa

    Daffa

    Joined:
    Jan 30, 2013
    Messages:
    8,147
    Resources:
    30
    Packs:
    1
    Maps:
    9
    Spells:
    18
    Tutorials:
    2
    Resources:
    30
    It's usable in normal editor, IF you choose CSS.
    Just for the first time of import, use JNGP to generate the TextMacro (read tutor at the CSS thread), then it's fine to use normal editor, and you need only little Jass knowledge.

    I think my minor addition called AdvBonusMod might be useful for the CSS, as you can use pure GUI instead of Jass.