Page 1 of 1

Combat robots life management

Posted: Tue Aug 22, 2017 6:53 pm
by Adil
When combat robots' lifetime runs out, they die but do not raise an event. Well, I'm making a mod that would benefit if they did as I want to differentiate between robots dying in battle and those dying of natural causes.

Also, there's no way to access their time_to_live .

Re: Combat robots life management

Posted: Tue Aug 22, 2017 8:53 pm
by Nexela
entity.time_to_live is now read/write for following robots also, player.following_robots will return a list of following robots following the character

I believe on_entity_died should be raised when following robots are killed by entities. However it might make sense to have following_robots that expire due to TTL raise on_entity_died as well.

Re: Combat robots life management

Posted: Sat Sep 02, 2017 1:18 am
by Rseding91
I added an event for combat robots expiring for 0.16.

It's called anytime the robot is removed due to a lack of energy, the time running out, or the player throwing new robots to replace old ones.