Server command does only work after changelevel
I have a small problem and want to know, if there is a way to fix it.
I have a 'sv_' command which only works with 'sv_cheats 1' and
when I use 'changelevel <mapname>' to restart the coop map.
The console shows up the changed value, so I am sure it is set up right,
but as long as I dont restart the map, or go to another map, it wont take effect.
So now I am looking for a way to either restart the map via OnMapSpawn (Once only!),
so I guess i would need a global variable or a file to save a variable to or I need
a console command to 'refresh' or 'load' the current 'sv_' values, to make them active.
The easiest way might be to make two BSP files, the first connecting to the second. The first will set the necessary values, then changelevel to the next.
FelixGriffin wrote:
The easiest way might be to make two BSP files, the first connecting to the second. The first will set the necessary values, then changelevel to the next.
Indeed. Create a intro map (as small as possible) which executes the commands and then changes the level.
.. and there is no way to save a value to a file or use a global variable?
I guess I will just add a button to restart the map then, and add a text message
so that players will know what to do. I just started to work on an old map idea
which i started in 2011 but stopped it, because there were too many problems.
I always wondered if there was a way to figure out the value of a server variable and use some sort of script to execute commands based off it, but never figured it out.
Creating a dummy map is a good alternative if a map restart is a must.
Remember to change the command back after the map has been finished just in case it interferes with other maps they would play.
I am already using a trigger brush and OnStartTouchOrangePlayer Output.
But even if I try to set the value myself, it wont work without a changelevel command.
So I guess I will have to live with that. 
I just slipped over the solution by accident.
Instead of restarting the map with change level, I just have to kill both players.
The command works as soon as at least one of them got killed. =)
PortalCombat wrote:
Yeah... sometimes I love randomness!
I just slipped over the solution by accident.![]()
Instead of restarting the map with change level, I just have to kill both players.
The command works as soon as at least one of them got killed. =)
What is this command? Sounds truly odd xD
ChickenMobile wrote:
What is this command? Sounds truly odd xD
sv_speed_normal (speed when you are not on speed gel)
FelixGriffin wrote:
Player_speedmod anyone?
Wouldn't this also change the speed when you are on speed gel too?
FelixGriffin wrote:
Well, yes, but it would just scale it by the same amount. And I'm pretty sure the gel speed convar can be set instantly.
It can, however I've found that a number of people have had trouble when I used this command in tc_vitrified. It would be better to change one thing rather than have to change one thing and then fix up the others.
FelixGriffin wrote:
Oh, you used it in Vitrified? Where?
The command for making max speed of the gel faster. I used it in my map so then you can make the jump to the other side. I think I increased both of these values so it made the jump easier to achieve.
sv_speed_paint_acceleration //how fast you speed up on gel
sv_speed_paint_max //max speed when running on gel