Does the issue occur in the editor or during gameplay? If it occurs during gameplay, please specify which movement system is being used (free movement or grid movement):
Gameplay.
Briefly describe the issue you're experiencing:
If you have a script that prints cursor.target and assign it to a keybind, it all works fine, printing all the objects/characters/tiles you mouse over, and then when you open a widget and press the key, it prints the element.
If you then close the widget, no matter what you mouse over (object/tile/character), it still prints the now closed widget element.
Are there any errors in the in-game debug console or external console window?
No.
Provide the steps necessary to reproduce the issue:
- make the following script:
log_message(cursor.target);
wait(2);
clear_log();
- Assign it to a keybind
- Quick play
- mouse over some map objects and press keybind (logs show correct objects)
- open inventory and mouse over a slot, and press keybind (logs show item slot)
- close inventory and mouse over a map object and press keybind (log still prints item slot)