HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

when an unit is dead ?

12-12-2007, 10:15 AM#1
Troll-Brain
GetUnitState(unit,UNIT_STATE_LIFE)<=value

I know the value is not 0, it's a little bigger but how exactly ?

i've found this post :
http://hilton.gw.oiccam.com/showthre...ght=dead+value

So the answer is 0.405
12-12-2007, 11:27 AM#2
moyack
yes, that's my favorite number :)
0.405 gogogogo
12-12-2007, 12:48 PM#3
cohadar
0.405 units are alive
0.404999999 units are dead
12-12-2007, 02:32 PM#4
rain9441
A unit with 0 health may soon become alive again if they have reincarnation!
12-13-2007, 06:13 AM#5
Pyrogasm
Quote:
Originally Posted by cohadar
0.405 units are alive
0.404999999 units are dead
You're off by 0.001 on both counts; not like it matters, though.
12-13-2007, 08:02 AM#6
cohadar
Quote:
Originally Posted by Pyrogasm
You're off by 0.001 on both counts; not like it matters, though.

No I'm not (tested it myself)
12-13-2007, 08:25 AM#7
PandaMine
I was wondering why that was so, hmm the DNS has been down for some time now I hope they fix it (this place is as populated as antarctica now)
12-13-2007, 11:32 AM#8
Troll-Brain
Quote:
Originally Posted by rain9441
A unit with 0 health may soon become alive again if they have reincarnation!
Hmm yes, i must check if the unit has an reincarnation ability so.
Thx
12-13-2007, 11:50 AM#9
Vexorian
Quote:
Originally Posted by PandaMine
I was wondering why that was so, hmm the DNS has been down for some time now I hope they fix it (this place is as populated as antarctica now)
Please don't mess with Antarctica.

It is not exactly the same DNS issue as the other time.
12-13-2007, 12:03 PM#10
Troll-Brain
How many digits behind the decimal point are there for real?
I tested to set life of an unit to 0.405 and she dead (the unit has a positive regeneration of life)
12-13-2007, 12:05 PM#11
Vexorian
Quote:
How many digits behind the decimal point are there for real?
As many as you want.

floats are... floats...
12-13-2007, 12:09 PM#12
cohadar
Quote:
Originally Posted by Troll-Brain
I tested to set life of an unit to 0.405 and she dead (the unit has a positive regeneration of life)

That is strange, when I set life of units to 0.405 they stay alive ???
12-13-2007, 12:37 PM#13
Vexorian
floats...
12-13-2007, 01:26 PM#14
Troll-Brain
i tested it for an human worker