on_player_died -> corpse & position

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

on_player_died -> corpse & position

Post by eradicator »

What?

The event on_player_died should contain a reference to the created corpse entity containing the players items.
And the position of death in case there is no corpse (not sure if that ever happens).

Why?

Because the only way i currently see to get the corpse or the position of death is to watch on_pre_player_died to store the position until on_player_died, and then use find_entity and hope that there is just one corse in the vicinity.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding interface requests”