[Added] checking if game is paused from zscript?

Moderator: GZDoom Developers

checking if game is paused from zscript?

Postby Marisa Kirisame » Sat Feb 13, 2021 4:02 am

Would it be possible to have (at least readonly) access to the paused variable? I don't think it should be much of an issue to do this.

I can easily do this myself but first I need to ask if it'd be right to expose it.
User avatar
Marisa Kirisame
ZScript Crimester
 
 
 
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: MarisaDOOM
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: checking if game is paused from zscript?

Postby Rachael » Sat Feb 13, 2021 6:03 am

This variable is game sync'd, so it should be possible to have readonly access from all contexts.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: checking if game is paused from zscript?

Postby Nash » Mon Apr 26, 2021 5:06 pm

Should only "paused" be exposed, or also "pauseext" (what does the latter even do anyway? I don't really understand its purpose)?
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: checking if game is paused from zscript?

Postby Player701 » Mon Dec 06, 2021 8:06 am

Got a PR here. Better late then never, I guess?

Nash wrote:Should only "paused" be exposed, or also "pauseext" (what does the latter even do anyway? I don't really understand its purpose)?

As far as I understand, pauseext is a flag that is used to suspend the game when it loses focus. Since the entire game is suspended, I don't think it would make sense exposing it to user code. However, please correct me if I'm wrong.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: checking if game is paused from zscript?

Postby Nash » Mon Dec 06, 2021 9:44 am

Player701: No, you're right, that doesn't seem like it has any business with mods. Good work. :)
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest