Event.on_entity_damaged triggered by a land mine

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
XaLpHa89
Fast Inserter
Fast Inserter
Posts: 119
Joined: Wed Jan 24, 2018 6:59 am
Contact:

Event.on_entity_damaged triggered by a land mine

Post 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 904 times
https://lua-api.factorio.com/latest/eve ... ty_damaged
https://wiki.factorio.com/Land_mine

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Event.on_entity_damaged triggered by a land mine

Post 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 818 times
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding discussion”