onentitydamaged : event contains the entity, the damage(amount/type) and the entity that caused the damage (if there is one)
onattack : contains unit group, engaging turrets (basicly the info the player already gets shown to the right of the toolbar when biters attack. I guess there's something like an event already in the factorio source for this
Possible use cases: buildings do certain things (e.g. spawn combat robots, stop/start trains, whatever is modable) when an entity in their area get's damaged.
(quoted from https://forums.factorio.com/forum/vie ... =25&t=7507)Choumiko wrote:I just got the idea for something like The Fat Controller: When being attacked, click a button and your camera switches to the attack. As i really like seeing those biters get killed but rarely am close enough
I'm sure there are loads of other uses