Page 1 of 1
Allow shooting_entity on LuaEntity turrets to be set to nil
Posted: Thu Aug 02, 2018 2:28 am
by Reika
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.
Re: Allow shooting_entity on LuaEntity turrets to be set to nil
Posted: Thu Aug 02, 2018 3:26 am
by Rseding91
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.
Re: Allow shooting_entity on LuaEntity turrets to be set to nil
Posted: Thu Aug 02, 2018 4:16 am
by Reika
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.
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.