While looking for other things in biter battles, i found that on_entity_damaged event would be triggered a lot on the script from what seems to me its just big unit groups moving around, but always with 0 damage.
Obviously the script can ignore those events, but the fact is that it will be triggering a lot of times, specially in a map sooo full of moving biters as is biter battles.
For what is worth, biters are assigned to a different force than the default enemy one (north_biters/south_biters) in case that means anything.
Thanks
on_entity_damaged triggered for unit groups moving
-
- Inserter
- Posts: 43
- Joined: Mon Mar 12, 2018 9:01 am
- Contact:
on_entity_damaged triggered for unit groups moving
- Attachments
-
- Screenshot (3).png (2.24 MiB) Viewed 3908 times
Re: on_entity_damaged triggered for unit groups moving
Can you provide some steps to reproduce what you are seeing?
A script snippet, save game, etc., would be useful
A script snippet, save game, etc., would be useful
-
- Inserter
- Posts: 43
- Joined: Mon Mar 12, 2018 9:01 am
- Contact:
Re: on_entity_damaged triggered for unit groups moving
I attached a save that its a bit previous to that effect happening. It will show on the game chat, just speed it up for a min or so.
As I said, the biters you will see are not from the "enemy" force but from the "south_biter" force, in case it helps.
Anything else I can provide, just ask, and thanks again
The related code is from https://github.com/M3wM3w/ComfyFactorio ... er.lua#L71, a modified version adding a couple log lines
As I said, the biters you will see are not from the "enemy" force but from the "south_biter" force, in case it helps.
Anything else I can provide, just ask, and thanks again
The related code is from https://github.com/M3wM3w/ComfyFactorio ... er.lua#L71, a modified version adding a couple log lines
- Attachments
-
- test67.zip
- (2.69 MiB) Downloaded 172 times
Re: on_entity_damaged triggered for unit groups moving
Thanks for the save. It's now fixed for the next version of 0.17. It was the acid slowdown stickers would trigger 0 damage on the biter as part of how they work to apply the slowdown effect. I changed it so if something tries to do 0 damage it just skips the entire damage system.
If something tries to do some damage which ends up as 0 after resistances it will still trigger the event(s).
If something tries to do some damage which ends up as 0 after resistances it will still trigger the event(s).
If you want to get ahold of me I'm almost always on Discord.
-
- Inserter
- Posts: 43
- Joined: Mon Mar 12, 2018 9:01 am
- Contact:
Re: on_entity_damaged triggered for unit groups moving
Cool, thank you!