Water turrets again.
When a fire is created, it spawns a dummy that my turrets can attack. The turret type in the picture is looking for targets automatically -- the game decides if an entity that's on its target_trigger_mask is within reach and targets it automatically. In other words: I don't assign the turret a target per script.
This usually works, but there are edge cases. As you can see in the following picture, fire and dummy (the combat-bot) are within min_range of the turret, so the gun is still in the stand-by position:
The turret obviously ignores this target, as expected. Now consider this picture:
The turret's gun has turned into the direction of fire and dummy -- it's clearly trying to attack because the target is just out of min_range. However, there is no stream! The turret is locked unto this target and won't look for another until the current target has been removed (which happens automatically once the fire has expired of its own). It just sits there waiting while it could have extinguished a lot of other fires in that time.
I consider this a bug because it's unexpected that turrets won't actually shoot at positions that they consider valid targets.
[Oxyd] Turrets attacking targets they can't attack
[Oxyd] Turrets attacking targets they can't attack
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Turrets attacking targets they can't attack
Can you provide test mod+save or some instructions to reproduce this, please?
Re: Turrets attacking targets they can't attack
Sure! WIP-version of my mod and a saved game are attached. You'll also need Creative Mod for the fluid source.
The turret is loaded. The four poles mark its min_range. You've got a flamethrower. Just start a fire somewhere just beyond min_range and see what happens. I haven't changed the TTL of fires, so it could take a while until the dummies are removed again.
- Attachments
-
- WaterTurret_1.0.2.zip
- (2.78 MiB) Downloaded 144 times
-
- waterturrets_dont_attack.zip
- (1.77 MiB) Downloaded 129 times
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Turrets attacking targets they can't attack
Are you sure it's locked to that target? When you place other burning targets, it doesn't switch? It makes sense that it would aim at a nearby target even if it's not quite close enough to hit yet.
Re: Turrets attacking targets they can't attack
Yes.
Right. It will switch (or return to stand-by) once the target has become invalid. I've attached mod and save file in the post just above yours, so you can see for yourself.When you place other burning targets, it doesn't switch?
It's too close to hit and it's not a mobile unit that may move into range in a while, so the turret should ignore it.It makes sense that it would aim at a nearby target even if it's not quite close enough to hit yet.
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Turrets attacking targets they can't attack
Related to 87158 (caused by this fix)
Re: Turrets attacking targets they can't attack
Thanks for looking at this! Are there any chances for a fix of that fix?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: [Oxyd] Turrets attacking targets they can't attack
Wonderful!
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!