dizietemblesssma Posted July 30, 2022 Share Posted July 30, 2022 I have found that while a messagebox is open hotkeys set in the MCM aren't registered but OnKeyDown() events are. However I cannot work out how to get the MCM menu to set the script property that will be the scancode to register and listen for.I have tried all sorts of combinations of the following in config,json and keybinds.json { "id": "Essential Hotkey", "text": "Hotkey to toggle essential status of NPCs", "type": "hotkey", "help": "This sets a hotkey to toggle the essential status of NPCs under the crosshair.", "valueOptions": { "allowModifierKeys": true }, "action": { "type": "CallFunction", "form": "dz_F4_little_things.esp|0800", "scriptName": "dz_F4_little_things_quest_script", "function": "dz_set_ess_hotkey", "params": ["{value}"] } } { "id": "Essential Hotkey", "desc": "Hotkey to toggle essential status of NPCs", "valueOptions": { "sourceType": "PropertyValueInt", "sourceForm": "dz_F4_little_things.esp|0800", "scriptName": "dz_F4_little_things_quest_script", "propertyName": "ess_hotkey" }, "action": { "type": "CallFunction", "form": "dz_F4_little_things.esp|0800", "scriptName": "dz_F4_little_things_quest_script", "function": "dz_set_ess_hotkey", "params": ["{value}"] } }I have moved the "action" from one file to the other, added sourcetype etc to both files, it seems that the keybinds.json cannot pass a value to the function it calls - keep getting "error: Type mismatch for argument 1." in the papyrus log if I try that,likewise the config.json doesn't seem to pass a value on selecting a hotkey in the menu either. I need to be able to have a script act on a keydown event while a message box is open, this worked in Skyrim because the MCM menu system there relied on the modder using OnKeyDown events.Any thoughts? diziet Link to comment Share on other sites More sharing options...
Recommended Posts