Page 1 of 1

Getting range of a turret from control.lua

Posted: Thu Jun 11, 2015 3:14 pm
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.

Re: Getting range of a turret from control.lua

Posted: Thu Jun 11, 2015 4:33 pm
by DaveMcW
No, you should post in Modding interface requests.

Re: Getting range of a turret from control.lua

Posted: Thu Jun 11, 2015 10:17 pm
by kds71
Thank you, I'm going to make a request then.