Hi all!
I'm working on a mod but need some help with finding a last-used entity (such as a vehicle) and am having difficulty understanding how to filter out all entities and only search for a specific type of entity through lua. Any help is appreciated!
Detection of Last Player Used Entity
-
- Manual Inserter
- Posts: 1
- Joined: Wed Mar 17, 2021 1:27 am
- Contact:
Re: Detection of Last Player Used Entity
Sounds like you want https://lua-api.factorio.com/latest/Lua ... s_filtered . There's a type= parameter to filter by entity type, or possibly you actually want to use the name= parameter. Type is more general - both the car and tank are type="car", but only the car is name="car".