Dead body without or with infinite remain time?

Place to get help with not working mods / modding interface.
PanTobi
Fast Inserter
Fast Inserter
Posts: 202
Joined: Fri Feb 05, 2016 12:34 am
Contact:

Dead body without or with infinite remain time?

Post by PanTobi »

^_^ i rebuilded my Abandoned Labolatory to be more like Blood Dungeon :D

and i want to continue that way, so i will need dead bodies :D
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?...
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Dead body without or with infinite remain time?

Post by darkfrei »

PanTobi wrote: Sat May 30, 2020 12:08 am ^_^ i rebuilded my Abandoned Labolatory to be more like Blood Dungeon :D

and i want to continue that way, so i will need dead bodies :D
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
PanTobi
Fast Inserter
Fast Inserter
Posts: 202
Joined: Fri Feb 05, 2016 12:34 am
Contact:

Re: Dead body without or with infinite remain time?

Post by PanTobi »

Hmm...

Its not working because object i select is not a corpse?...
lol?...

ScreenShots:
IMG
ofc. before i press Enter i move my mouse over Corpse...

Any comand to spawn corpse?...
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Dead body without or with infinite remain time?

Post 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}})
Post Reply

Return to “Modding help”