Page 1 of 1
[Resolved 0.4.0] [minor imperfection] die() method
Posted: Sun Apr 28, 2013 3:47 pm
by rk84
I tested this method with couple entity types and find that it does not trigger dying sound and does not spawn corpse for unit type.
I though it might have been forgotten, since dying_explosion for spawners and turrets work.
Ps. oh I forgot. Based on wiki there should be sethealth, but it is missing in game.
Re: [minor imperfection] die() method
Posted: Sun Apr 28, 2013 7:14 pm
by kovarex
Hi thank you for the report.
You are right with the die, it was inconsistency in our code, fixed for 0.4.
The health has been changed, now the access is through the operator =, I will update the wiki after the 0.4 is released.
Code: Select all
unit.health = 5 -- set unit health
print(unit.health) -- read unit health
Edit: PS: testing this ingame with command
Code: Select all
game.player.character.getselected().die()
Feels like finger of death

Re: [minor imperfection] die() method
Posted: Sun Apr 28, 2013 8:10 pm
by rk84
Cool. Could make better god game than black & white

Re: [minor imperfection] die() method
Posted: Mon Apr 29, 2013 12:35 am
by FreeER
rk84 wrote:Cool. Could make better god game than black & white


I have spent many hours with black & white, it would be amazing if Factorio had a god mode that rivaled it

so amazing I think I would probably forget to eat/sleep for several days or maybe weeks
Now if only I could find/win/earn a million dollars and make sure it happens
