Page 1 of 1
Dead body without or with infinite remain time?
Posted: Sat May 30, 2020 12:08 am
by PanTobi
^_^ i rebuilded my Abandoned Labolatory to be more like Blood Dungeon
and i want to continue that way, so i will need dead bodies

I can place then using Map Editor but dead body i place have 15 minutes remain time...
and thats not enough xD
Is there any command to change body remain time to infinite or disable it somehow?...
Re: Dead body without or with infinite remain time?
Posted: Sat May 30, 2020 10:53 am
by darkfrei
PanTobi wrote: Sat May 30, 2020 12:08 am
^_^ i rebuilded my Abandoned Labolatory to be more like Blood Dungeon
and i want to continue that way, so i will need dead bodies

I can place then using Map Editor but dead body i place have 15 minutes remain time...
https://lua-api.factorio.com/latest/Lua ... se_expires #LuaEntity.corpse_expires
(not tested):
Code: Select all
/c local entity = game.player.selected
entity.corpse_expires = 60 * 60 * 60 * 24 -- 24 hours of real time
Maybe
Code: Select all
/c game.player.selected.corpse_expires = math.huge
Re: Dead body without or with infinite remain time?
Posted: Sat May 30, 2020 1:02 pm
by PanTobi
Hmm...
Its not working because object i select is not a corpse?...
lol?...
ScreenShots:
ofc. before i press Enter i move my mouse over Corpse...
Any comand to spawn corpse?...
Re: Dead body without or with infinite remain time?
Posted: Sat May 30, 2020 5:35 pm
by darkfrei
PanTobi wrote: Sat May 30, 2020 1:02 pm
Any comand to spawn corpse?...
https://lua-api.factorio.com/latest/Lua ... ate_entity #LuaSurface.create_entity
character-corpse
inventory_size :: uint (optional)
player_index :: uint (optional)
(not tested:)
Code: Select all
/c
local surface = game.player.surface
local position = game.player.position
surface.create_entity({name="character-corpse", position={position.x, y+5}})