Lua: openmw.input bugs during main menu on scripts attached to MENU
Triggers/actions made during the main menu do not persist when loading into the game, whether using new game or loading a saved game.
using openmw .49-RC5
No other mods than my test mod
Test mod: https://pastebin.com/ZfXCC5dT
Logs: https://pastebin.com/MmabfksL
reproduction steps:
- attach test mod to MENU
- load into main menu
- make bindings for the test action and trigger in settings->scripts
- load into the game
- try and use the bindings (nothing happens)
- console -> reloadlua
- try the bindings again (should work now)
When loading into the game the following errors appear in the log
[17:23:51.784 I] Changing to interior
[17:23:51.785 I] Loading cell Seyda Neen, Foryn Gilnith's Shack
[17:23:51.793 E] Menu[example/menu.lua] onFrame failed. Lua error: Unknown action key: "TestAction"
[17:23:51.793 E] stack traceback:
[17:23:51.793 E] 	[C]: in function 'getBooleanActionValue'
[17:23:51.793 E] 	[string "example/menu.lua"]:85: in function <[string "example/menu.lua"]:75>
[17:23:51.793 E] 	[C]: in ?
[17:23:51.793 I] L@0x1[scripts/omw/input/actionbindings.lua]:	Skipping invalid binding TestTrigger: trigger TestTrigger doesn't exist
[17:23:51.793 I] L@0x1[scripts/omw/input/actionbindings.lua]:	Skipping invalid binding TestAction: action TestAction doesn't existThe error that "TestAction" does not exist is spammed every frame since my test script checks it every frame.
Edited  by Mads Buvik Sandvei