[Resolved 0.4.0] [minor imperfection] die() method

This subforum contains all the issues which we already resolved.
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

[Resolved 0.4.0] [minor imperfection] die() method

Post 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.
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [minor imperfection] die() method

Post 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 :)
User avatar
rk84
Filter Inserter
Filter Inserter
Posts: 556
Joined: Wed Feb 13, 2013 9:15 am
Contact:

Re: [minor imperfection] die() method

Post by rk84 »

Cool. Could make better god game than black & white :lol:
Test mode
Searching Flashlight
[WIP]Fluid handling expansion
[WIP]PvP gamescript
[WIP]Rocket Express
Autofill: The torch has been pass to Nexela
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [minor imperfection] die() method

Post by FreeER »

rk84 wrote:Cool. Could make better god game than black & white :lol:
:shock: I have spent many hours with black & white, it would be amazing if Factorio had a god mode that rivaled it :D 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 :D
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net
Post Reply

Return to “Resolved Problems and Bugs”