Go
Wc3C.net
»
Warcraft III Modding
»
Developer's Corner
»
Triggers & Scripts
»
A few JASS lines
A few JASS lines
10-11-2006, 10:48 PM
#1
darkwulfv
Ok, what is the JASS for the following?
Average (like taking 2 or more numbers and averaging them together)
Unit max HP
unit current HP
Thanks for any help.
10-11-2006, 10:59 PM
#2
PipeDream
0.5
*(
GetWidgetLife
(
u
)+
GetUnitState
(
u
,
UNIT_STATE_MAX_LIFE
))
10-11-2006, 11:07 PM
#3
darkwulfv
Well that works. Thanks! I coulda sworn there was just a thing for it, like AVG or somethin. ah well.
10-11-2006, 11:07 PM
#4
Alevice
Couldn't find average equivalent. Likely you will have to make it by yourself.
CurrentHP
GetUnitState
(
YourUnit
,
UNIT_STATE_LIFE
)
MaxHP
GetUnitState
(
YourUnit
,
UNIT_STATE_MAX_LIFE
)
EDIT: Beaten :/