PAUSE Sound

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
GENTEK
Posts: 673
Joined: Mon Aug 05, 2013 5:10 pm

PAUSE Sound

Post by GENTEK »

Hey Doomers! :D
I would like to play a sound when you pause/unpause the game, someone know a way to do that because I've seen nothing related to that ?
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: PAUSE Sound

Post by wildweasel »

There is probably not a legit way to do this, as pausing the game also pauses the sound system.
GENTEK
Posts: 673
Joined: Mon Aug 05, 2013 5:10 pm

PAUSE Sound

Post by GENTEK »

Ah so I've my answer thanks wildweasel! :D
User avatar
Rachael
Posts: 13954
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: PAUSE Sound

Post by Rachael »

Sounds on the "menu" channel still play in pause mode, and the UI ZScript code still runs. I don't know much about ZScript but it might be possible to construct a WorldUITicked event (or whatever it might be called) that checks for the pause state change and plays a sound accordingly.
Post Reply

Return to “Scripting”