Weaponswitch Script

VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
<div class="IPBDescription">I know Q3 but no HL</div> Hi,

I tried to make a weapon switching script tat allowed me to leap to someone and switch to bite with the same button. I am familliar with Q3 engine scripting and i noticed it is pretty much the same as the HL engine i thought it would work:
<!--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-->
set d1 "slot1; bind ctrl vstr d2"
set d2 "slot3; bind ctrl vstr d1"
bind n "vstr d1"
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

But on execing it it tells me it doesn't recognise the set command.

Does anyone know how to fix this?

Comments

  • CoolCookieCooksCoolCookieCooks Pretty Girl Join Date: 2003-05-18 Member: 16446Members, NS1 Playtester, Contributor, Constellation
    change set to alias and it should work i think
  • KaineKaine Join Date: 2002-08-07 Member: 1096Members, 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-->set d1 "slot1; bind ctrl vstr d2"
    set d2 "slot3; bind ctrl vstr d1"
    bind n "vstr d1"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    should be

    <!--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 d1 "slot1; bind ctrl d2"
    alias d2 "slot; bind ctrl d1"
    bind n "d1"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    try that <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • funbagsfunbags Join Date: 2003-06-08 Member: 17099Members
    isnt that like..a little against the rules? You are asking someone for a script so when you hit someone with leap, it automatically switches out bite and bites them?


    lamer.
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    Don't think so. It is a bit better since i don't have to bash the numpad area too much.
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    edited April 2004
    Here's a better way of doing it, by using the weapon names rather than slots.

    <!--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 d1 "weapon_leap; alias d3 d2"
    alias d2 "weapon_bitegun; alias d3 d1"
    alias d3 "d1"
    //bind <key> d3
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

    Also the use of the third alias will let you bind it to any key without having to change the aliases.
  • KaineKaine Join Date: 2002-08-07 Member: 1096Members, Constellation
    <!--QuoteBegin-funbags+Apr 11 2004, 08:54 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (funbags @ Apr 11 2004, 08:54 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> isnt that like..a little against the rules? You are asking someone for a script so when you hit someone with leap, it automatically switches out bite and bites them?


    lamer. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    no, what you are saying there is impossible with HL scripting. he just wants a cyclic weapon switch script, which is easy. i don't think the one i posted does that exactly (or at least not in any useful way i can see) but i'm showing him how to catch a fish, i'm not catching it for him <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo-->
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    <!--QuoteBegin-funbags+Apr 11 2004, 03:54 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (funbags @ Apr 11 2004, 03:54 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> isnt that like..a little against the rules? You are asking someone for a script so when you hit someone with leap, it automatically switches out bite and bites them?


    lamer. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    And no, it doesn't automaticly switch; he still has to press the button. It's pretty much the same as using lastinv.
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    Thanks for the help so far. I'll try that one Urd noted out.
  • funbagsfunbags Join Date: 2003-06-08 Member: 17099Members
    then why cant he do leap, then press 1 and bite?
  • GodhandGodhand Join Date: 2003-08-02 Member: 18737Members
    whats it matter how he wants to play the game?

    no one questions what models you use. thats potentially the same thing. we dont ask "Why dont you jsut use the defaults?"
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    I use my own keys, i always keep a certain pattern for all games, so i don't get used to the wrong keys.

    Guess what, weaponcycle doesnt work...
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    edited April 2004
    What, mine doesnt work?

    Work's when i tested it. :/
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    Must be my fault. I know that //bind <key> d1 is a note, i assume i am supposed to bind that manually?
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    Yes your supposed to bind it ingame, and note: if you try to use it while holding down the trigger, it wont work.
  • SpritzSpritz Join Date: 2004-04-04 Member: 27723Members
    I pwn the HL-scripting..

    alias +leap2 "slot3; wait; +attack"
    alias -leap2 "-attack; slot1"

    bind q +leap2


    (hud_fastswitch must be 1)
    That is what I use <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    Now that is a lamer script.. The other scripts only switch weapons, that one fires for you as well. But if you really wanted a good auto attack script, you can do better than that. <!--emo&;)--><img src='http://www.unknownworlds.com/forums/html//emoticons/wink.gif' border='0' style='vertical-align:middle' alt='wink.gif' /><!--endemo-->
  • TrayderTrayder Join Date: 2003-10-30 Member: 22127Members, Constellation
    uhhhhh, Customization Help and Troubleshooting? i don't think so.

    Its not that hard to find a scripting tutorial, why can't people just learn themselves instead of asking everyone else <!--emo&:angry:--><img src='http://www.unknownworlds.com/forums/html//emoticons/mad.gif' border='0' style='vertical-align:middle' alt='mad.gif' /><!--endemo-->
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    Why can't people learn how to not post if they aren't going to help or make a positive or constructive comment? Such as your post which basically boils down to this: You are not allowed to ask for help because what you want help with doesn't suit ~ME~. <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html//emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif' /><!--endemo-->
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    YAY IT WORKS!

    Erm, Urd ur sig, the [NSA] part....is that a clan?
  • Dorian_GrayDorian_Gray Join Date: 2004-02-15 Member: 26581Members, Constellation
    NSA = <a href='http://www.nsarmslab.com/' target='_blank'>NS Arms Lab</a>
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    Since it is an W:ET clan i know.

    Oh well. Spritz your script is useless, suppose i jump over someone, i don't want to bite then, especially if i got focus.
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    Hi, its me again <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->.

    Does anyone know what are the weapon commands for Swipe and Blink? The keys to switch between these are too remote from my controls to quickly switch, so a similar bind would be nice.

    Thanks in advance.
  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    <!--QuoteBegin-funbags+Apr 11 2004, 09:54 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (funbags @ Apr 11 2004, 09:54 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Hello, I saw the mention of scripts in the topic and thought I'd come in and call you a lamer. I have no idea of what your script does or how to script so I'm just going to flame you because I am ignorant. <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
    Well said <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->
  • MintmanMintman Join Date: 2003-05-30 Member: 16866Members
    edited July 2004
    <!--QuoteBegin-Virushunter+Jul 21 2004, 06:42 AM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Virushunter @ Jul 21 2004, 06:42 AM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--> Hi, its me again <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->.

    Does anyone know what are the weapon commands for Swipe and Blink? The keys to switch between these are too remote from my controls to quickly switch, so a similar bind would be nice.

    Thanks in advance. <!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    weapon_blink and weapon_swipe I think. I'm pretty sure that's right. By the way, I wrote a tutorial on scripting here which explains the basics of Half-Life scripting: <a href='http://www.unknownworlds.com/forums/index.php?showtopic=74222' target='_blank'>http://www.unknownworlds.com/forums/in...showtopic=74222</a>
  • VirushunterVirushunter Join Date: 2004-04-11 Member: 27845Members
    Nope, i tried those but they didnt work.
Sign In or Register to comment.