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

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

Status
Not open for further replies.

Deleted member 242951

D

Deleted member 242951

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.
 

Deleted member 242951

D

Deleted member 242951

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)

Once I've got the bonus mod, what do I do? say its CSS then ?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
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.
 

Deleted member 242951

D

Deleted member 242951

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)
 
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.
 
Status
Not open for further replies.
Top