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.

A Pause script request for when you press alt tab

y 65

Member

As my title says i am looking for a script that:



-When Alt+tab is pressed Game pauses
-Has function to stop BGM/SE/BGS/ME When alt tab is pressed
-Has function to start BGM/SE/BGS/ME from were it left of before pause
-Graphic Freeze
- Activated on pressing of Alt tab and if the person opens the window have a all black screen optamicy 10 with the words
Some were along the line of Press W to unpause
-Make W the unpause Switch

-OR if you want to be fancy Make it so when The Window is alt tabbed or minimized it pauses and when you Press W it unpauses

If i need to be more descriptive or you want me to make the image myself feel free to post Thank you in advance
 
The game automatically pauses when you press Alt+tab (you're not in the game window anymore), but the music and sound effects continue to play.

Unless you somehow want to keep the same window and just pause it, which I'm not sure is possible because you'll need to override a Windows command?
 
if you use a rebuilt audio class (using winmm i recommend... its the easiest) then you can make the BGM pause when the window loses foces (minimised, not selected, etc.)

im not gonna release that script though as its for my game... but its just a little thing to help you

also winmm cant layer (as far as i know) so only 1 of the 4 music types can be rebuilt... because of this it means you cant pause SE ME or BGS (as im sure you'd rebuild BGM) but as they're usually small quick or repetative music files you can just use se_stop blabla and that should work nicely too
 

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