• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[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,258
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