Getting range of a turret from control.lua
Posted: Thu Jun 11, 2015 3:14 pm
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:
but it doesn't work.
Code: Select all
entity.range
entity.prototype.range
game.entityprototypes['gun-turret'].range