HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

HP/Mana Leaderboards

02-26-2003, 11:08 AM#1
Rio
This is probably an easy question, but I figure I may as well ask rather than taking forever to figure it out on my own.

Basically, I was wondering how you can set up triggers to show a unit's HP and mana on the leaderboard. Since leaderboards seem to show integers, and these values are reals, it seems to require an extra step to reconcile the two. Then again, I really don't know much about leaderboards at all.

Help, anyone?
02-26-2003, 05:03 PM#2
DaKaN
you can convert a real to an integer, the function is there when picking a integer:

i belive the JASS function call is R2I( varible )

note: converting the real to an integer will drop all decimals, it only uses whole numbers
02-26-2003, 06:16 PM#3
Rio
Quote:
Originally posted by Dakan
you can convert a real to an integer, the function is there when picking a integer:

i belive the JASS function call is R2I( varible )

note: converting the real to an integer will drop all decimals, it only uses whole numbers

Well, I'd prefer to do it without Jass if at all possible.. I'm not really familiar with it, unless you can give me an exact script or something.
02-26-2003, 06:27 PM#4
Guest
I think that function is also in the drop down list. Where you would normally put an integer, look for "Convert Real to Integer".

EDIT: This might be a USMWE add-in, so make sure you have that from Scio.
02-27-2003, 01:28 AM#5
Aiursrage2k
Don't like jass, then look in the integer category, find function, Conversion real to integer, and then find the function mana of unit, health respectively. It's basically just doing the conversion using the jass, but each to his own...

set udg_health = R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()))
set udg_mana = R2I(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit()))