Getting range of a turret from control.lua

Place to get help with not working mods / modding interface.
Post Reply
kds71
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Contact:

Getting range of a turret from control.lua

Post by kds71 »

I'm working on another mod (here), which adds a new item that can be used to probe the range of a turret (you can equip this item and click on a turret and it will display the range). It works pretty well right now, but my main problem is that I had to hardcode ranges of turrets into mod, because I can't find any way to read them in control.lua. Is it possible to obtain the range somehow? I've tried:

Code: Select all

entity.range
entity.prototype.range
game.entityprototypes['gun-turret'].range
but it doesn't work.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Getting range of a turret from control.lua

Post by DaveMcW »

No, you should post in Modding interface requests.

kds71
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Fri Mar 06, 2015 12:27 pm
Contact:

Re: Getting range of a turret from control.lua

Post by kds71 »

Thank you, I'm going to make a request then.

Post Reply

Return to “Modding help”