Latches for CVARINFO

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8081
Joined: Sun Jan 28, 2007 3:55 pm

Latches for CVARINFO

Post by Major Cooke »

Seeing it was removed from sv_cheats had me thinking... There's been many times I've been craving latches for different events happening, some of which could be when changing a map, or starting a new game. I have some gameplay options that, in order to prevent players from getting the immediate benefit and doing switcharoos and then switching back, I had to code in myself but if it's hard coded into the engine, I wouldn't need to worry about those anymore.

So I propose a couple latches:
  • Map Latch - The config option kicks in the change upon loading a new map
  • New Game Latch - Takes place upon starting fresh - pistol start, either from death exit or starting a new game - triggers it
Along with a sub-latch to specify whether to trigger on maps already visited in a hub or not.
User avatar
Marisa the Magician
 
 
Posts: 3843
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia

Re: Latches for CVARINFO

Post by Marisa the Magician »

This does make sense, considering there's so many things that require a map restart to take full effect. Having the cvar latch would at least let players know right away that it's required.
User avatar
Player701
 
 
Posts: 1465
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Latches for CVARINFO

Post by Player701 »

Since we're talking about latch CVArs, I could really use the ability to get both the actual ("latched") and the new (queued) value of a latched CVAR via ZScript, unless this is already in and I've somehow missed it happening. (As far as I'm aware, the current ZScript APIs allow retrieving only the latched value.)

Return to “Feature Suggestions [GZDoom]”