Project Zomboid

Project Zomboid

This topic has been locked
~ Diviad ~ Aug 11, 2023 @ 3:58pm
Pause-On-Focus-Lost - Is there a way?
PZ has lost focus a few times that I have been playing for no apparent reason. Not big deal usually, as I can get back to PZ in a few seconds and continue. Well, the other night, this happened immediately after I opened a door which a zed was behind. Before I could attack (I knew it was there), PZ lost focus, my screen went black for a few seconds, while (I guess?) my screen was changing resolutions to accommodate my desktop, finally reaching my desktop while hearing my arm getting chewed on. Once I finally got back to PZ, I was bitten and lacerated in a few places.
Welp, There goes my character. They just kicked their smoking habit also :(

I couldn't find a setting in the options, or a mod to do this in my brief search.
This post way back in 2016 brings up PZ's apparent lack of this basic option.
https://steamcommunity.com/app/108600/discussions/0/365163686049859091/

So is there still no option to pause PZ when it loses focus?
Or am I missing it somewhere?
< >
Showing 1-10 of 10 comments
Armagenesis Aug 11, 2023 @ 5:14pm 
The game shouldn't be constantly losing focus like that in the first place.
Check again if your PC met the requirement to run the game.
Check if something like firewall or antivirus is acting up while the app is running.
Also check if one of the mods you installed is causing this issue.

This part sounds especially suspicious:
my screen went black for a few seconds, while (I guess?) my screen was changing resolutions to accommodate my desktop
freerobots Aug 11, 2023 @ 7:00pm 
I don't think a screen going black during a mode switch is suspicious at all. Some displays have quite a delay when switching between full screen apps and the desktop. My previous display was a g9 oddyssey and it suffered from this issue. Sometimes it could take up to 10 seconds to complete the switch. I've certainly had other displays that would blank for a second or two, but none nearly as bad as the g9.

For something like PZ I would have avoided the problem by playing in fullscreen windowed mode. But for other games where FPS mattered more, I would generally avoid alt-tabbing when anything important was going on. This is past tense as my current display switches fairly quick.

IDK why op is being pulled to the desktop though. To me it sounds more like a misbehaving program, or windows itself doing something silly. Programs that might cause such problems could be your mouse software (e.g razer central), screen recorders, 3rd party overlays, etc.
Unfortunately, no there's no option or current working mod I'm aware of for this. Hopefully the devs can eventually add that to the game, other games do it, I'm unsure how difficult it would be for them to implement.
Legion Aug 11, 2023 @ 9:21pm 
It doesn't need an option to pause when you lose focus because the developers expect you to have a rig that can run it, plus whatever reason you're losing focus which is 100% on your end. It happens once in a blue moon to me when I use my HDMI splitter if I accidentally bump it while playing, but taking you to desktop screams that a program is interfering.
Yaeri Aug 11, 2023 @ 9:59pm 
I've had the same problem as long as I've had the game. PZ would without warning, and with no discernible reason suddenly switch to the background. I end up in windows and have to put PZ in the front again.

Deadly indeed if it happens during a zombie fight.
I long ago installed a cheating mod specifically for this. If zombie bites like that, I switch god mode on and off quickly. Of course if there's a bunch of zombies, then by the time the screen switches on again I'm already well and truly dead.
I've found no solution to this problem. I've posted about it too in the past and it seems only a very few people suffer from this phenomenon.
Puppers Aug 12, 2023 @ 10:06am 
as long as there is an option to turn it off, i do not like games that have that pause focus, I alt tab a lot and i dont like using overlays for performance reasons.
~ Diviad ~ Aug 12, 2023 @ 11:21am 
Originally posted by Armagenesis:
Check again if your PC met the requirement to run the game.
I have 32 gigs or ram and run almost every other modern game I play at native 4k. Think I should up to 128 Gigs and get a system that will run every other game I own at 8k 120hz just to be safe?

Bust seriously @Armagenesis & @Nomadic, why join a thread to condescend and avoid addressing the actual question in the OP?

I don't like the idea of cheating my bite away, but maybe it is a temporary remedy.

Originally posted by freerobots:
For something like PZ I would have avoided the problem by playing in fullscreen windowed mode.
I will try this and experiment with different windowed modes. I just like full immersion in full screen while I game. If it is in a window, at least I will probably be able to click back into PZ before anything catastrophic happens.

It is clear this has been a problem for a long time now that still has not been properly addressed. Even if there are other applications that remove focus, pausing on loss of focus seems like a simple solution, if it is not super difficult to implement.
If anyone has other possible solutions, please share them :)
Goldthorn Aug 12, 2023 @ 11:36am 
I would take it nothing's popping up when it happens, you seem intelligent enough to have noticed that if the same window were up every time PZ collapsed. I have it happen occasionally too. Best I can gather in my case, I don't think my mouse (SteelSeries Rival 5) software plays nice sometimes with games that are overlaying a cursor. As in, how it seems to work is the cursor for the desktop is still there, just invisible and supposed to be paralyzed, but it doesn't always stay that way. So occasionally I'll move the mouse in game and click something, and next thing I know the program's bailing, there's a mouse cursor on the task bar, and it clicking the task bar just collapsed the game and threw me back to desktop. This of course does not necessarily mean you have the same problem, and I'm unable to tell if this's a problem with PZ itself and other games that use a similar manner of mouse control, or the mouse software, or both in combination. Figured I'd toss this in though in case it could help lend you some insight to your own problem.
Last edited by Goldthorn; Aug 12, 2023 @ 11:38am
Emmanuel Nov 9, 2024 @ 2:23pm 
Same here. I have 3.000+ hours on PZ, and it happens randomly about every 6 hours of play. On my last laptop it was probably less, maybe twice rarer. But still, I die 75% of the time. It is my n°1 cause of death, without time to do anything. I just create a new character, and try to find the body of the previous one. Sad this happens, sad there is no auto-pause (at least as an option). I never figured out what could be the cause
Zoe Nov 9, 2024 @ 10:06pm 
This thread was quite old before the recent post, so we're locking it to prevent confusion.
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Aug 11, 2023 @ 3:58pm
Posts: 10