Iterating through entities in the loaded map
Iterating through entities in the loaded map
Hey, sorrry this probably seems simple, but how do you iterate through all entities in map of a certain name. Is that what game.get_entity_by_tag does? is tag an index?
Re: Iterating through entities in the loaded map
Iterate over game.surfaces and use find_entities_filtered
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Iterating through entities in the loaded map
yeah, this one isn't exactly as straight forward as you would expect it to be.
the command to do what you want only exists as it does because I requested it, before that, you had to define which area you wanted to search too, so the easiest way was to search chunk by chunk, so there would have been an extra step to it.
the command to do what you want only exists as it does because I requested it, before that, you had to define which area you wanted to search too, so the easiest way was to search chunk by chunk, so there would have been an extra step to it.