Page 1 of 1

Detection of Last Player Used Entity

Posted: Wed Mar 17, 2021 1:33 am
by gilbertrpg
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!

Re: Detection of Last Player Used Entity

Posted: Wed Mar 17, 2021 3:42 am
by Silari
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".