TL;DR
Make the field "following_robots" works for standard entities, not only for characters.What ?
The LuaControl field "following_robots" needs to be called on an object that is a character, but from a script, I can create combat robots and by setting the source parameter, make them follow a standard entity (let's say a vehicle):Code: Select all
surface.create_entity({
name = "defender-capsule",
force = source_entity.force,
source = source_entity, -- my vehicle
...
My suggestions:
- make the field "following_robots" works for standard entities, not only for characters - at least vehicles, but seems to me it could be used on other entities types.
- and maybe respect the "maximum_following_robot_count" limit on a per entity basis. Not sure about this, as it would be easy to check table_size(following_robots) and letting this unlimited gives more modding possibilities.
Why ?
Because robots can follow a vehicle, I would like to be able to manage them as with a character.As an example:
- by now to respect the "maximum_following_robot_count" limit on a vehicle, I have to handle the following robots count myself.
- when a robot dies, I don't know which vehicle it was following, to create a new one... or to override the dying animation to make it come back to the vehicle.