Allow shooting_entity on LuaEntity turrets to be set to nil
Allow shooting_entity on LuaEntity turrets to be set to nil
LuaEntity already has 'shooting_entity', but it cannot be set to nil to tell the turret not to target anything (or clear an existing target). In fact, there seems to be no way to set a turret to "No current target" at all.
![Image](https://i.imgur.com/cM2ZM3K.gif)
Re: Allow shooting_entity on LuaEntity turrets to be set to nil
Ok, I changed it for 0.17 so it can be set to nil. Now, the next tick the turret updates it will look for a new target so I'm not sure if it's that useful.
If you want to get ahold of me I'm almost always on Discord.
Re: Allow shooting_entity on LuaEntity turrets to be set to nil
Does on_tick run after this? If so, I can just clear it every tick, and so prevent a firing upon things it should not shoot.Rseding91 wrote:Ok, I changed it for 0.17 so it can be set to nil. Now, the next tick the turret updates it will look for a new target so I'm not sure if it's that useful.
![Image](https://i.imgur.com/cM2ZM3K.gif)