How to detect user clicked on alert?

Place to get help with not working mods / modding interface.
Post Reply
jarcionek
Fast Inserter
Fast Inserter
Posts: 137
Joined: Thu Mar 10, 2016 11:26 am
Contact:

How to detect user clicked on alert?

Post by jarcionek »

I would like to know when user clicks on the alert to see it on the map, however I cannot find any way to achieve it.

It seems that there is no event fired for it. The only thing I have found is LuaPlayer.get_alerts() but it doesn't let me do anything other that say "yes, there is an alert".

There is LuaPlayer.render_mode so I could detect if the player's render mode has changed while alerts are showing, and if it was the case assume that it was because of player clicking on it. However, if player is already in the map view, render_mode will remain the same.

Post Reply

Return to “Modding help”