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
Fast Inserter
Fast Inserter
Posts: 119
Joined: Wed Jan 24, 2018 6:59 am

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 )
script.on_event( defines.events.on_entity_damaged, script_event_on_entity_damaged )
20220519095059_1.jpg (486.52 KiB) Viewed 138 times
https://lua-api.factorio.com/latest/eve ... ty_damaged

Factorio Staff
Factorio Staff
Posts: 12213
Joined: Wed Jun 11, 2014 5:23 am

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 (77.8 KiB) Viewed 52 times
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding discussion”