Currently entities of type "combat-robot" don't raise event on their destruction. In my currently developed mod it'd be useful to detect when such entities are no more.
Also, there's no way to access their remaining lifetime, at least reading access would be good.
Request: combat-robots type additions
Request: combat-robots type additions
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Request: combat-robots type additions
Is it possible to override the death event in the robot entity definition so that it triggers a custom event I'D which you can attach a custom event handler to?
By death event I mean the action which occurs when they die and triggers things like explosions etc
By death event I mean the action which occurs when they die and triggers things like explosions etc
Re: Request: combat-robots type additions
It is possible to have a trigger_created_entity spawned as a death explosion. This is how DroneHome mod works currently.
However, I'd like to have an access to the entity itself prior its death bur by the time trigger_created_entity event is risen the robot entity becomes invalid. (Albeit it can till be found by find_entities_filtered(). )
However, I'd like to have an access to the entity itself prior its death bur by the time trigger_created_entity event is risen the robot entity becomes invalid. (Albeit it can till be found by find_entities_filtered(). )
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: Request: combat-robots type additions
See LuaEntity.time_to_live and on_combat_robot_expired.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.