Page 1 of 1

Event.on_entity_damaged triggered by a land mine

Posted: Thu May 19, 2022 8:18 am
by XaLpHa89
I would like to show the damage when a player walks over a land mine. Only the Event.on_entity_damaged is not triggered. What can I do? Use of other mods not desired. Can you please change the animation, it's always very weird when you're stuck by a land mine.

Code: Select all

local function script_event_on_entity_damaged( event )
game.print( event.cause.name .. ' -- ' .. event.cause.type )
end
script.on_event( defines.events.on_entity_damaged, script_event_on_entity_damaged )
20220519095059_1.jpg
20220519095059_1.jpg (486.52 KiB) Viewed 1115 times
https://lua-api.factorio.com/latest/eve ... ty_damaged
https://wiki.factorio.com/Land_mine

Re: Event.on_entity_damaged triggered by a land mine

Posted: Sun Jun 19, 2022 3:49 pm
by Rseding91
I can't reproduce any issue: when I walk into a landmine it triggers the event as expected:
Capture.PNG
Capture.PNG (77.8 KiB) Viewed 1029 times