Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

No F1, F12 and Alt+Return

No F12
Version: (0x86 << 0b11 | ~0x632) + (?\030 >> 2) & 5
By: Cremno

Description

Dis- and re-enables F1 (options), F12 (reset) and Alt + Return (full screen).

Demo

7z-archive
zip-archive

Instructions

See demo (the event and the section called No F12 in the Script Editor).

Author's Notes

If you interested in the source code send me a PM.

Terms and Conditions

None but if you like it or use it - especially in a commercial game - I'm pleased when you contact me.
 
Really nice. I am still wondering how do you could disable the F12 key, and the Alt+Enter accelerator. I have searched through all the web some kind of thing to disable keys and VK accelerators, but I found none. What do you used? A hooking system, an API?

Also, nice version format, but I prefer a simple "1", hehe.
 
why would you want disable those? they are all good commands. use f12 all the time in games when I have to restart a battle or something
 
@Khoa & Zeriab:
Thanks :grin:

@vgvgf:
The DLL sets a keyboard hook to the process that attachs the DLL. Destroying the accelerator table (with DestroyAcceleratorTable you can do it) isn't possible unless you know the handle of the accel.

@SolstICE:
I've written this for me because I didn't want to have a full screen feature in my game (imagine Minesweeper in full screen mode :haha: ) and if I change the resolution of the RGSS Player Alt+Return sets the resolution back to the defaults again - annoying. The other keys were requested and so I added them.

And not everyone scripts uses one of the several ways ($@, defined? or Module#method_defined?) to prevent the System Stack Error. I know a good RGSS scripter like you don't have to disable F12 but if someone is using a script that raises this exception disabling F12 is a faster way instead of fixing the script.
 
@SolstICE, disabling F12, can be good for games like Diablo, where it is supposed that what happens can't be undone, cause the game is saved when it exits. Well, you can really avoid that autosave feature from diablo, but it is not really worthy to do so, as it is not easy. So if you disable the F12 key, you can make your game harder with something like Diablo save system, or just making it difficultier to load a game.
Also, there are scripts that can mess all up when the game restarst, and not only with the "Stack Error" from aliases, but with other things.

@Cremno, thanks for the info :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top