Disabling Vanilla Pause/Escape Key

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

ByTheBookGames
Fighter Fly
Fighter Fly
Posts: 36
Joined: Tue Jun 04, 2019 8:35 pm

Disabling Vanilla Pause/Escape Key

Postby ByTheBookGames » Wed Sep 09, 2020 9:20 pm

Been tinkering with a way to prevent the escape key from pausing the game regardless of the player's assigned "pause" input. Global memory only affects what pause menu graphics are visible/selected and different events like onKeyboardPressDirect are essentially read-only. Is this straight-up impossible, is there something obvious I'm missing, or has anyone discovered a workaround? Thanks in advance for taking the time to try to help.

Rixitic
Spike
Spike
Posts: 266
Joined: Sat Dec 12, 2015 1:00 am
Contact:

Re: Disabling Vanilla Pause/Escape Key

Postby Rixitic » Wed Sep 09, 2020 11:27 pm

You can use the onPause event to cancel pausing but it doesn't affect the editor debug menu, just when the episode is played from the launcher. Also, if you're trying to set up a custom pause menu and you want it to show up in the editor, you should toggle it from a player.rawKeys.pause check in onTick instead of in onPause.

We've got player.rawKeys and onPause covered in the new WIP documentation here: https://docs.codehaus.moe

ByTheBookGames
Fighter Fly
Fighter Fly
Posts: 36
Joined: Tue Jun 04, 2019 8:35 pm

Re: Disabling Vanilla Pause/Escape Key

Postby ByTheBookGames » Thu Sep 10, 2020 8:32 am

rixithechao wrote:
Wed Sep 09, 2020 11:27 pm
You can use the onPause event to cancel pausing but it doesn't affect the editor debug menu, just when the episode is played from the launcher. Also, if you're trying to set up a custom pause menu and you want it to show up in the editor, you should toggle it from a player.rawKeys.pause check in onTick instead of in onPause.

We've got player.rawKeys and onPause covered in the new WIP documentation here: https://docs.codehaus.moe
Fantastic. I wasn't aware of that documentation, that's wonderful. Thanks for your support.

I hope to share the developments I've been working on as soon as they're stable enough to be useful. I've developed a working online networking system for hosts and clients in a custom SMBX project using luasocket, allowing online multiplayer incorporating up to 2 local players, but hope to tweak it for use in vanilla SMBX2b4 once it's finished (still working on smoothing out the synchronization of NPCs, then blocks and so forth). In a previous attempt, I also recreated most player behavior through lua scripts alone (thinking this would allow for 4 player local, were it not for the insurmountable obstacle of camera limiations), and will probably publish what I have of it, since it's been useful for me in copying bits and pieces for projects, in case it's useful for anyone else.

Really appreciate the quick responses and helpful suggestions on these forums.


Return to “LunaLua Help”

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari