Find entity
Posted: Mon May 19, 2014 12:42 pm
Hi all.
I'm a programmer, but it's my first time with LUA. I've looked through the documentation and other mods, but haven't found the solution for these scenários.
Could anyone help please?
There are three questions here:
1 - Is there any way to find the nearest entity of some kind without using the game.findentities or findentitiesfiltered? They are very slow if we use a large area (100 or 1000 for instance).
Example of use that I need: find the nearest spawner from a roboport or find the nearest ore of some type from a certain position.
2 - Is there any way to move an entity from point A to point B without "teleporting" it?
Example of use that I need: Move a custom robot from point A to B. (Mechs )
3 - As a player/bitter moves, they do not have damage from colision on trees, but a car has.
How does it work? Is it possible to remove/customize these settings? (I don't want my bots killing themselves on trees or destroying the base. I could remove the colision box, but they would fly and that's not the initial idea).
Thanks a lot.
I'm a programmer, but it's my first time with LUA. I've looked through the documentation and other mods, but haven't found the solution for these scenários.
Could anyone help please?
There are three questions here:
1 - Is there any way to find the nearest entity of some kind without using the game.findentities or findentitiesfiltered? They are very slow if we use a large area (100 or 1000 for instance).
Example of use that I need: find the nearest spawner from a roboport or find the nearest ore of some type from a certain position.
2 - Is there any way to move an entity from point A to point B without "teleporting" it?
Example of use that I need: Move a custom robot from point A to B. (Mechs )
3 - As a player/bitter moves, they do not have damage from colision on trees, but a car has.
How does it work? Is it possible to remove/customize these settings? (I don't want my bots killing themselves on trees or destroying the base. I could remove the colision box, but they would fly and that's not the initial idea).
Thanks a lot.