Page 1 of 1

on_unit_created

Posted: Sat Nov 11, 2017 5:10 pm
by darkfrei
Hi all!
How to get units spawning event?

Re: on_unit_created

Posted: Sat Nov 11, 2017 5:40 pm
by Rseding91
There is currently no such event. What would you want it for?

Re: on_unit_created

Posted: Sat Nov 11, 2017 6:17 pm
by darkfrei
Rseding91 wrote:There is currently no such event. What would you want it for?
Take entity.unit_number and call on_tick one of them.

It was a mod idea, where two enemies (biter + spitter) have chance to make one a new unit with higher tier. Two first are dying after it.

Scan chunks for units can be much slower and it's easy to call unit from the table.

Re: on_unit_created

Posted: Sat Nov 11, 2017 7:00 pm
by DaveMcW
It would be much easier to upgrade a spitter spawner to a super-unit spawner if there is a biter spawner nearby.