I'm trying to create a mod that uses tileable entities but I don't know how you can check to see if another entity is next to it or not.
Does anyone know how to do this?
Thanks
How do you check for certain entities in certain co-ordinates?
-
- Manual Inserter
- Posts: 1
- Joined: Fri Jul 19, 2019 1:47 am
- Contact:
Re: How do you check for certain entities in certain co-ordinates?
[Koub] Moved to Modding help
Koub - Please consider English is not my native language.
-
- Filter Inserter
- Posts: 587
- Joined: Sun Jun 09, 2019 10:40 pm
- Contact:
Re: How do you check for certain entities in certain co-ordinates?
You almost certainly want one of the "find_*" methods on the surface; please do consider if you can use the "find_non_colliding_position*" rather than finding the exact entities and implementing it in lua every time you use these tools.boonleboon wrote: ↑Fri Jul 19, 2019 1:51 amI'm trying to create a mod that uses tileable entities but I don't know how you can check to see if another entity is next to it or not.
Does anyone know how to do this?
Thanks
https://lua-api.factorio.com/latest/LuaSurface.html