Console Commands

DiscipleDisciple Join Date: 2003-10-28 Member: 22084Members, Constellation
edited May 2004 in NS General Discussion
<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.

Comments

  • Cereal_KillRCereal_KillR Join Date: 2002-10-31 Member: 1837Members
    you mean without looking at the scoreboard, without looking at which team you're spectating at, and without looking at your player hud? Because in a game like NS it's quite obvious which team you're in.

    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.
  • HibameHibame Join Date: 2003-11-16 Member: 22974Members, Reinforced - Shadow
    I have an idea of what you may want but with out further explanition what your asking I dont know. But my idea is make it so that when you join thought F1 it can exec a file like marine.cfg and have all the settings you want for marines loaded. But I could be wrong becouse lack of information as to what your trying to do.
  • NovisNovis Join Date: 2003-08-09 Member: 19193Members
    There's a way to do this via the commandmenu.
    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.
  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    You cannot create variables or evaluate the values of variables that already exist within scripts.
  • Cereal_KillRCereal_KillR Join Date: 2002-10-31 Member: 1837Members
    I think he wants to have something that shows him whether he is alien or marine for whatever reason. I suppose its for some sort of plugin.
  • DiscipleDisciple Join Date: 2003-10-28 Member: 22084Members, Constellation
    Thanks a lot guys! The TEAM1 and TEAM2 thingies were exactly what I was looking for!
  • NovisNovis Join Date: 2003-08-09 Member: 19193Members
    edited May 2004
  • MrPinkMrPink Join Date: 2002-05-28 Member: 678Members
    Half life script's cannot do "if", only "do". Example: You can not do a script such as "if ammo in weapon = 0, reload", you can only do "shoot shoot shoot shoot shoot shoot shoot shoot shoot reload shoot shoot shoot shoot shoot shoot shoot"
  • DelphiDelphi Join Date: 2003-04-02 Member: 15134Members, Constellation
    <!--QuoteBegin-MrPink+May 27 2004, 09:14 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (MrPink @ May 27 2004, 09:14 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Half life script's cannot do "if", only "do". Example: You can not do a script such as "if ammo in weapon = 0, reload", you can only do "shoot shoot shoot shoot shoot shoot shoot shoot shoot reload shoot shoot shoot shoot shoot shoot shoot" <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    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-->
  • HibameHibame Join Date: 2003-11-16 Member: 22974Members, Reinforced - Shadow
  • NovisNovis Join Date: 2003-08-09 Member: 19193Members
    Hm, is this realy true in a general (or programming) context ?
    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-->
  • wascally_wabbitwascally_wabbit Join Date: 2003-09-09 Member: 20701Members
    edited May 2004
    Those are SORT of conditional statements... However it is all based on an event occuring. You can't evaluate how many bullets are left in the gun, what team you're on, etc... No boolean operators either.
  • MrPinkMrPink Join Date: 2002-05-28 Member: 678Members
    <!--QuoteBegin-Novis+May 28 2004, 12:06 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Novis @ May 28 2004, 12:06 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Hm, is this realy true in a general (or programming) context ?
    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".
  • NovisNovis Join Date: 2003-08-09 Member: 19193Members
    <!--QuoteBegin-me23+May 28 2004, 01:45 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (me23 @ May 28 2004, 01:45 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Those are SORT of conditional statements...  However it is all based on an event occuring.  You can't evaluate how many bullets are left in the gun, what team you're on, etc...  No boolean operators either.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    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.
  • Jared101Jared101 Join Date: 2004-02-22 Member: 26804Members
    what DO you wnat this for
  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    edited May 2004
    <span style='color:white'>Related post nuked.</span>
  • NovisNovis Join Date: 2003-08-09 Member: 19193Members
    edited May 2004
    Let me rephrase this in a nice way:
    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--> )
Sign In or Register to comment.