Console Commands
Disciple
Join Date: 2003-10-28 Member: 22084Members, Constellation
<div class="IPBDescription">variables?</div> Hello everyone!
I was wondering, however it is possible to find out through the console which team I'm in or not. The reason of my questioning is not one I wish to share with you at this point, thou.
If there is not, I wonder how to make variables, for instance I can have a button setting a variable to "1" or "2" depending on which team I'm joining.
(i.e. bind b "varname 1; jointeamone")
Thanks your time // Disc
PS. dont answer "why would you want that for?", please.
I was wondering, however it is possible to find out through the console which team I'm in or not. The reason of my questioning is not one I wish to share with you at this point, thou.
If there is not, I wonder how to make variables, for instance I can have a button setting a variable to "1" or "2" depending on which team I'm joining.
(i.e. bind b "varname 1; jointeamone")
Thanks your time // Disc
PS. dont answer "why would you want that for?", please.
Comments
All I know is that it's possible to know through HLSW if you have rcon, so I'd think you'd need some sort of admin privilege... Though I'm probably wrong alltogether on this last one.
Check this thread: <a href='http://www.unknownworlds.com/forums/index.php?showtopic=59449' target='_blank'>Commandmenu: Executing commands according to your current team</a>
Other than that, there's no way to evaluate cvars within scripts.
That is simply the geekiest way to put it.
And I laughed. <!--emo&:(--><img src='http://www.unknownworlds.com/forums/html//emoticons/sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /><!--endemo-->
Aliases,for example, allow for a certain degree of conditional constructs.
i.e., I can do something like 'IF player moved to the left THEN jump ELSE IF player moved to the right THEN duck' <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo-->
Aliases,for example, allow for a certain degree of conditional constructs.
i.e., I can do something like 'IF player moved to the left THEN jump ELSE IF player moved to the right THEN duck' <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo--> <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
That's still not a true "if" statement, that's more "move right and duck" or "move left and jump".
That's absolutely true, this only works on user activated events, not for conditions that are set by the game (maybe except for the commandmenu workaround, where the game 'prepares' the team1/team2 conditional execution...).
It still allows for some useful scripting (and I'm not talking about exploits here - remember the jerky map-scrolling in commander mode, for an example ? This can be solved with some tricky alias scripting)
<!--QuoteBegin-MrPink+May 28 2004, 03:32 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MrPink @ May 28 2004, 03:32 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->That's still not a true "if" statement, that's more "move right and duck" or "move left and jump"<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
It's more than simply doing commands in sequence - "move right and duck" is not the same as "duck if moved right before", as you can duck or jump <i>depending</i> on your previous move.
1. while it <i>is</i> possible to create custom variables in scripts (i.e.
2. setting variables this way is somewhat irrelevant for scripting, as they can only be accessed by mods/plugins and not by scripts.
Furthermore, I could wish there were more class/team specific commandmenu-keywords (like team1/team2, as mentioned before) adapted to ns: There are still a lot of leftovers from TFC available, they just don't make any sense in ns, like "soldier","medic", "sniper" (interestingly, all classes go as "sniper" <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo--> )