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

[JASS] silly n00b first post question

Status
Not open for further replies.

PuK

PuK

Level 1
Joined
Dec 12, 2007
Messages
1
Hi all,

please be kind to my really bad problem. i am making a map and one of my heroes has a skill that will cause him to randomly damage a unit that attacks it. at the moment the damage alloted is an arbitrary amount. i'm wonder how i would deal damage based on the hero itself?

Cheers,

PuK
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Well you use your current trigger and make the damage formula to what you want.

Use the integer returning functions for hero stats like str, agi or even int.

You can also even get the number of HP/MP a unit or hero has. There is a real function that returns the quantity for that.

Sadly you can not get any other unit stats without using really complex formulas and systems that are really not worth it.

Should be very easy in jass if you know simple maths.
 
Status
Not open for further replies.
Top