Toumal Posted July 21, 2021 Posted July 21, 2021 Hi, I noticed the following in the patch notes: Scripting. The scripting function Unit.getLife() returns a value that is 1 higher than what the units actual health is - fixed. What does this mean for scripting? Do I have to check whether a unit is alive by doing if (unit:GetLife() > 1.0) as before? Or does GetLife now return values between 0.0 and 1.0 as one would expect?
toutenglisse Posted July 21, 2021 Posted July 21, 2021 55 minutes ago, Toumal said: Hi, I noticed the following in the patch notes: Scripting. The scripting function Unit.getLife() returns a value that is 1 higher than what the units actual health is - fixed. What does this mean for scripting? Do I have to check whether a unit is alive by doing if (unit:GetLife() > 1.0) as before? Or does GetLife now return values between 0.0 and 1.0 as one would expect? Explanation of the issue by Grimes here :
Toumal Posted July 21, 2021 Author Posted July 21, 2021 Aaaah, ok so the behavior doesn't change, it's just getting rid of an erroneous offset. Gotcha, thanks!
Recommended Posts