Is there a console command for joining a random team?
DarkScythe
Join Date: 2012-08-30 Member: 156876Members
Hey everyone,
Just a quick question, for anyone that knows.
I know j1 is to join marines, and j2 is to join aliens.
rr is the ready room, and spectate is, well, spectate.
However, I can't seem to figure out the command for joining a random team.
The wiki says j3, but that doesn't work. I tried various iterations of random, joinrandom, randomteam, etc, but nothing worked. At least on my local server.
Any ideas?
Just a quick question, for anyone that knows.
I know j1 is to join marines, and j2 is to join aliens.
rr is the ready room, and spectate is, well, spectate.
However, I can't seem to figure out the command for joining a random team.
The wiki says j3, but that doesn't work. I tried various iterations of random, joinrandom, randomteam, etc, but nothing worked. At least on my local server.
Any ideas?
Comments
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->/ NS2 game mode console commands
Event.Hook("Console_jointeamone", OnCommandJoinTeamOne)
Event.Hook("Console_jointeamtwo", OnCommandJoinTeamTwo)
Event.Hook("Console_readyroom", OnCommandReadyRoom)
Event.Hook("Console_spectate", OnCommandSpectate)
Event.Hook("Console_film", OnCommandFilm)
// Shortcuts because we type them so much
Event.Hook("Console_j1", OnCommandJoinTeamOne)
Event.Hook("Console_j2", OnCommandJoinTeamTwo)
Event.Hook("Console_rr", OnCommandReadyRoom)<!--c2--></div><!--ec2-->
No random.
A server could easily re-implement it
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->Event.Hook("Console_j3", OnCommandJoinTeamRandom)<!--c2--></div><!--ec2-->
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->local function OnCommandJoinTeamRandom(client)
local player = client:GetControllingPlayer()
JoinRandomTeam(player)
end<!--c2--></div><!--ec2-->
(untested)
I was only attempting to bind F1-4 the way it was in NS1, so I wasn't intending to mod anything.
If it doesn't exist, then I'll just have to go without it.