How do I make turrets attack all enemy buildings?

Place to get help with not working mods / modding interface.
Post Reply
_ImPat
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sun Sep 04, 2016 5:13 pm
Contact:

How do I make turrets attack all enemy buildings?

Post by _ImPat »

Hello,
I am currently looking for a way to make turrets attack all enemy structures. Not only military but also walls, machines, belts etc.
I would greatly appreciate the help.

User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: How do I make turrets attack all enemy buildings?

Post by aubergine18 »

As far as I know it's not currently possible, unless this gets implemented: viewtopic.php?f=28&t=35361
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.

sore68
Fast Inserter
Fast Inserter
Posts: 123
Joined: Mon May 02, 2016 8:39 am
Contact:

Re: How do I make turrets attack all enemy buildings?

Post by sore68 »

_ImPat wrote:Hello,
I am currently looking for a way to make turrets attack all enemy structures. Not only military but also walls, machines, belts etc.
I would greatly appreciate the help.

This page is determined as will help you.
http://lua-api.factorio.com/latest/LuaSurface.html

find_entities_filtered
find_enemy_units
find_nearest_enemy

These three commands are useful in turrets.

Post Reply

Return to “Modding help”