Check, if the hotkey is still pressed?

Place to get help with not working mods / modding interface.
User avatar
jodokus31
Smart Inserter
Smart Inserter
Posts: 1631
Joined: Sun Feb 26, 2017 4:13 pm
Contact:

Check, if the hotkey is still pressed?

Post by jodokus31 »

I wonder, if it's possible to check, if a hotkey is still pressed after the initial event.

I'm currently try to implement some kind of support of dragging the mouse over entities and do something, while the hotkey is still pressed.

My current approach is to save, that the hotkey event has happened and keep doing things, on the "on_selected_entity_changed" event while not more than 30 ticks are passed. This kinda works, but I can also stop pressing the hotkey and only move the mouse from entity to entity. This feel a bit janky
Post Reply

Return to “Modding help”