HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Fluident hp alteration, maybe old news

09-07-2003, 11:02 AM#1
Youma
This might be old news, but then you have made a bad job spreading the news to us poor people who dwell on other forums than wc3c.

You can use handicap to set max life of individual units by transferring them between players, but I need some help making the algorithms work properly. Does anyone have specs on handicap?

This is what I've got so far...
09-07-2003, 02:14 PM#2
Youma
Seems either noone here is interested...or everyone suck at maths. : )

Here is a another thread if you're interested...


http://www.battle.net/forums/war3/th...nt=4#post60580
09-07-2003, 02:28 PM#3
Bloodlust
tbh: i dont care at all
09-07-2003, 04:10 PM#4
Grater
Handicap changes the units hp by the unit types max life at 100%.... Like if you have 800 HP knights, and set the handicap to 50%, any knights will lose 400 HP, set it to 150%, they gain 400. Doesn't matter what previous handicap operations have been done on the knight.

An easy way to get the max life is to set the handicap to 100% and create a new unit of the unit type of the target unit, takes it's max life, then remove it (or if you know for sure the trigger will only ever be run on each unit once you can use it's max life at the start of the trigger)
Then to get the handicap %age, do
100 + 100 * Amount/MaxLife

Heres a map which lets you add, remove and set a units hp to either a value or a %age of current, works perfectely.
09-07-2003, 05:20 PM#5
Youma
Damn you wc3c, you win this time... :(