by GooberMan » Sun Mar 17, 2013 3:47 am
KEYDEFS is the place to set up aliases and add menu options to the keys menu. But for years, there has been no way to add custom cvars for your mod.
I finally hit this problem when trying to make a simple slider to control text speed for cutscenes. Using MENUDEF on a cvar that hasn't been set and archived in a previous instance of ZDoom results in the slider always sitting at zero and not responding to movement.
My suggestion is the addition of a command called defaultcvar. It takes two parameters - the cvar name, and the default value. The effect of calling this from the console or KEYDEFS would be to check if the cvar exists, set it to the default if it does not exist, and set it to archive.
It would be fab to have this soon as I'm looking at releasing an open pre-alpha for my project and want the slider to actually work for it.
KEYDEFS is the place to set up aliases and add menu options to the keys menu. But for years, there has been no way to add custom cvars for your mod.
[url=http://forum.zdoom.org/viewtopic.php?f=3&t=35737]I finally hit this problem[/url] when trying to make a simple slider to control text speed for cutscenes. Using MENUDEF on a cvar that hasn't been set and archived in a previous instance of ZDoom results in the slider always sitting at zero and not responding to movement.
My suggestion is the addition of a command called defaultcvar. It takes two parameters - the cvar name, and the default value. The effect of calling this from the console or KEYDEFS would be to check if the cvar exists, set it to the default if it does not exist, and set it to archive.
It would be fab to have this soon as I'm looking at releasing an open pre-alpha for my project and want the slider to actually work for it.