PikaChris wrote: ↑Fri Feb 11, 2022 1:29 pm
How do I set up a hotkey for the function to work?
something like this should work:
Code: Select all
local checkKey = VK_CONTROL --which key to exit on
function onKeyboardPress(keyCode)
if(checkKey == keyCode) then
Level.exit(LEVEL_WIN_TYPE_NONE)
end
end
the full list of usable keys to assign can be found
here.
please note though that while this is the easier option when compared to making a custom pause menu, it has the potential to absolutely
ruin people who use alternative control schemes, and making it configurable by the user is probably comparable in complexity to implementing your own navigatable pause menu, so for inexperienced lunalua users it's a bit of a "pick your poison" kind of situation.