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 havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. 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:
    559
    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,855
    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,889
    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,855
    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,889
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    Yes.
     
  6. [E]clipse

    [E]clipse

    Joined:
    Jan 6, 2015
    Messages:
    559
    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,889
    Resources:
    3
    Maps:
    2
    Spells:
    1
    Resources:
    3
    BonusMod Does the Exact thing as CSS.
     
  8. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,653
    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:
    559
    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,889
    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 the Mage

    Daffa the Mage

    Map Moderator

    Joined:
    Jan 30, 2013
    Messages:
    7,660
    Resources:
    27
    Packs:
    1
    Maps:
    8
    Spells:
    16
    Tutorials:
    2
    Resources:
    27
    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.