Is there no separate event for entity clicks?

Place to get help with not working mods / modding interface.
Xeon257
Inserter
Inserter
Posts: 39
Joined: Wed Sep 24, 2025 6:25 pm
Contact:

Is there no separate event for entity clicks?

Post by Xeon257 »

I’m trying to make an NPC dialogue window appear when a certain entity is clicked. However, it seems there’s no specific event for entity clicks. Is there any good way to achieve this?
I am not able to write in English myself, so I am using ChatGPT for help. Please excuse any awkward phrasing.
User avatar
Osmo
Fast Inserter
Fast Inserter
Posts: 187
Joined: Wed Oct 23, 2024 12:08 pm
Contact:

Re: Is there no separate event for entity clicks?

Post by Osmo »

Also https://lua-api.factorio.com/latest/eve ... InputEvent if you create a CustomInput linked to open-gui and read player.selected (which can work for entities out of reach and/or ones that can't have a gui)
Post Reply

Return to “Modding help”