Hi,
I red this post "on_entity_damaged event"
viewtopic.php?f=28&t=25542
and I understand it's too cpu demanding.
But, in the same order of idea, but easier, it would be nice in the on_entity_died event to have the identity of the entity who killed the other (infact gave the last fatal wound) : an "event.author" field would be nice (could be a player, an alien, a turret or a robot) : it would be great for PvP mods, in order to detect which force destroys which building (to win the game) or which player killed who (to make reports about killings), or count aliens death per forces, etc... It would be less cpu demanding because only trigger on death. You have to find who is belonging the ammo which killed the entity.
on_entity_died author ?
on_entity_died author ?
My mods on the Factorio Mod Portal
Re: on_entity_died author ?
I just noticeed that there is a kill_counts on LuaForce, so I guess that factorio is already tracking this kind of event. So it wouldn't be hard to add a "author" or "killer" entity field to the on_entity_died event... Please, it would help me so much in my PvP mod
My mods on the Factorio Mod Portal
Re: on_entity_died author ?
The force that did the killing is known, the "what" that actually killed it not known since it can be anything or nothing.
If you want to get ahold of me I'm almost always on Discord.
Re: on_entity_died author ?
is it known from the event of the on_entity_died ? because it is not explicit in the doc :Rseding91 wrote:The force that did the killing is known, the "what" that actually killed it not known since it can be anything or nothing.
https://wiki.factorio.com/index.php?tit ... ntity_died
And even if I parse regularly the kill_counts from all forces, and try to compute differences, it will be a big work to find out which force kill a specific entity (let say a specific building for example).
My mods on the Factorio Mod Portal