Script Error

Real_PUAReal_PUA Join Date: 2005-03-23 Member: 46255Members
<div class="IPBDescription">Calling for meds when i dont want it</div> I use this medpack script:

alias +med "say_team I need a medpack!"
alias -med "impulse 10"
bind "z" "+med"


Sometime when I open console and then close it I call for a medpack (But I dont say "I need a medpack"). Its confusing, and im sure annoying for comms. Any ideas?

Comments

  • obuhobuh Not Quite Smart at NS Join Date: 2003-03-31 Member: 15072Members, Constellation
    <!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias med "say_team I need a medpack!; impulse 10"
    bind "z" "med"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    That should fix it. It's because when you leave the console, the "-" part of the script is executed if you have a "+" something bound.
  • Real_PUAReal_PUA Join Date: 2005-03-23 Member: 46255Members
    Okay you are correct that opening and closing the console activates the minus (-) commands. I changed the medpack script so there is no minus command in it and now I call for ammo! haha I need to change that one too. Also, my gun fires a bullet due to my pistol script. Why does the console activate the minus commands? Is there some purpose that it serves?
  • Real_PUAReal_PUA Join Date: 2005-03-23 Member: 46255Members
    edited May 2005
    oops {double post}. Thanks for your help too.
  • a_civiliana_civilian Likes seeing numbers Join Date: 2003-01-08 Member: 12041Members, NS1 Playtester, Playtest Lead
    <!--QuoteBegin--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> </td></tr><tr><td id='QUOTE'><!--QuoteEBegin-->Also, my gun fires a bullet due to my pistol script.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    You can prevent this by having your console key unbind your attack key as well as close the console, and then creating an alias that rebinds it on the unpress and binding that alias to some unused key like joy1.

    Like so:<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->alias unbindm1 "unbind mouse1"
    bind "`" "toggleconsole;unbindm1"
    alias +rebindm1
    alias -rebindm1 "bind mouse1 +pshot"
    bind joy1 +rebindm1<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    (Change +pshot to whatever your pistol script alias is named.)

    The same problem occurs with the escape key, but this fix cannot be applied there because Half-Life/Steam does not allow the escape key to be rebound.
Sign In or Register to comment.