Need Help With A Script.

ZxypherZxypher Join Date: 2005-02-01 Member: 39438Members
Was wondering how i might go about writing a script to select slot 4, use the weapon in slot 4 and then switch back to slot 1 ? It sounds easy but everything i've tryed hasnt worked. Thanks.

Comments

  • illusionillusion Join Date: 2004-08-25 Member: 30889Members
    you newbbie...






    just kidding.





    i could write up something for you, but i need some more information.

    1. are there any specific weapons you want to use in this combo?
    2. do u want weapon 4 to be used once? or until you release the bind button?
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver
    <a href='http://comvex.freeserverhost.com/forums/viewtopic.php?t=90' target='_blank'>http://comvex.freeserverhost.com/forums/viewtopic.php?t=90</a>

    My pack has, among other things, a script that will attack with a specific slot while the right mouse button (the popup menu is changed to mouse3, which is clicking down on the wheel) is held down and, when released, switch back to slot 1. The slot used for my quickattack is different for each team/species. Here's the list:

    Marine: Knife (slot3)
    Skulk: Leap (slot3)
    Lerk: Spore (slot2)
    Fade: Blink (slot2)
    Onos: Stomp (slot3)
    Gorge: Healspray (slot2)

    This allows for blink/swiping and leap/biting while being very intuitive, and having many uses outside those two.

    You can also easily change which slot the quickattack will use. v and b cycle back and forth, respectively, through the slots. You will hear the half-life announcer saying a number, which is the number of the slot it is set to.

    This quickattack will also work on servers that have mp_blockscripts set to 1, but you will have to hold down the button and then press your regular attack button, as it disallows the +attack and -attack commands in the script.
  • Swift_IdiotSwift_Idiot Join Date: 2003-01-05 Member: 11883Members
    <span style='font-size:8pt;line-height:100%'>alias +s4 "slot4;wait;+attack;
    alias -s4 "-attack;wait;slot1"

    hold down the key to switch to slot4 and attack, release to stop attacking and return to slot1.</span>

    I assume you're using this for primal scream lerking or xenobiting skulkery or charge goring? Works ok if you only have one item in slot4 as marine too, for quick armor repair when you have heavy armor. I think this is what you want anyway. Come back if it's not.
  • ZxypherZxypher Join Date: 2005-02-01 Member: 39438Members
    Thanks Swift, that's exactly what i needed =D
  • Swift_IdiotSwift_Idiot Join Date: 2003-01-05 Member: 11883Members
  • ZxypherZxypher Join Date: 2005-02-01 Member: 39438Members
    Err, the -attack doesnt seem to be working, i just keep attacking no matter what i do ? what did i do wrong ?
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation
    <!--QuoteBegin-Swift Idiot+Feb 4 2005, 01:51 PM--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>QUOTE</b> (Swift Idiot @ Feb 4 2005, 01:51 PM)</td></tr><tr><td id='QUOTE'><!--QuoteEBegin--><span style='font-size:8pt;line-height:100%'>alias +s4 "slot4;wait;+attack;
    alias -s4 "-attack;wait;slot1"

    hold down the key to switch to slot4 and attack, release to stop attacking and return to slot1.</span>

    I assume you're using this for primal scream lerking or xenobiting skulkery or charge goring?  Works ok if you only have one item in slot4 as marine too, for quick armor repair when you have heavy armor.  I think this is what you want anyway.  Come back if it's not.<!--QuoteEnd--></td></tr></table><div class='postcolor'><!--QuoteEEnd-->
    Your missing a "
    <!--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 +s4 "slot4;wait;+attack"
    alias -s4 "-attack;wait;slot1"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver
    gj swift.

    Make sure you bind the key to "+s4" and not just "s4" as well.
Sign In or Register to comment.