Please or Register to create posts and topics.

Server command does only work after changelevel

Page 1 of 2Next

Hey guys.

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.

[back on TWP since 08. July 2017]
Steam: DrFauli

What command are you talking about?

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.

Falsi sumus crusto!
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.

?????????????????????????????TWP Releases | My Workshop

.. so there is no way to check the state of a 'sv_' variable?
.. 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.

[back on TWP since 08. July 2017]
Steam: DrFauli

I guess you're using a logic_auto to fire those outputs OnMapSpawn, ensure you leave enough delay to let the map settle everything down before your outputs (like 0.10 or 0.20). However, sometimes in coop, the problem is the logic_auto entity that's buggy. Try a trigger brush under any player instead.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

It really depends on what server command you want to execute. There are some commands which only take effect after you change or restart the level.

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.

?????????????????????????????TWP Releases | My Workshop

Well, thanks for your replies.
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. :(

[back on TWP since 08. July 2017]
Steam: DrFauli

Yeah... sometimes I love randomness!
I just slipped over the solution by accident. :lol:

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. =)

[back on TWP since 08. July 2017]
Steam: DrFauli
PortalCombat wrote:
Yeah... sometimes I love randomness!
I just slipped over the solution by accident. :lol:

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

?????????????????????????????TWP Releases | My Workshop
ChickenMobile wrote:
What is this command? Sounds truly odd xD

sv_speed_normal <value> (speed when you are not on speed gel)

[back on TWP since 08. July 2017]
Steam: DrFauli
Page 1 of 2Next