some problem i need help solving it

Voodo_HUNVoodo_HUN Join Date: 2006-11-29 Member: 58773Members
edited January 2007 in Scripting Discussion
<div class="IPBDescription">fast wep change script</div>[edit]reduced aliases:
OK i have this script, some words are hungarian, but you can indentify them by aliases, so the script would be:

alias firstattack "slot1;w;+attack"
alias secondattack "slot2;w;+attack"
alias thirdattack "slot3;w;+attack"
alias fourthattack "slot4;w;+attack"
alias realias1 "alias +first firstattack"
alias realias2 "alias +second secondattack"
alias realias3 "alias +third thirdattack"
alias realias4 "alias +fourth fourthattack"
alias +first "realias2;realias3;realias4;slot1;w;+attack;alias +first +attack"
alias -first "-attack"
alias +second "realias1;realias3;realias4;slot2;w;+attack;alias +second +attack"
alias -second "-attack"
alias +third "realias1;realias2;realias4;slot3;w;+attack;alias +third +attack"
alias -third "-attack"
alias +fourth "realias1;realias2;realias3;slot4;w;+attack;alias +fourth +attack"
alias -fourth "-attack"
bind mouse1 +first
bind mouse2 +second
bind mouse4 +third
bind mouse5 +fourth
//end
this script is for fade wep change
the problem is: if i press mouse4, it changes to metabolize, does 1 metabozlize, or until i hold it. if i dont change wep and press mouse4 again it does metabolize.
if i switch to acid rocket by pressing mouse5 it "launches a rocket" but if i want to change back to metabolize (by mouse4) it launches another rocket instead of switching to metabolize and doing it
the same problem with swipe-metabolize change, but it works correctly with swipe-acid rocket change
if i type the realias_x stuff in console, it works correctly
[edit]: w is wait <img src="style_emoticons/<#EMO_DIR#>/smile-fix.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile-fix.gif" />
i know it could be simplyer, but if it would only be like "alias +elso slot1;w;+attack" than slot1 would always count, which makes the hl engine wait with the next hit, therefore i loose time
[edit again]:
if i use with the 1-4be alias stuff the metabolize dont works, if i use it by copying their value in to the +elso - +negyedik lines the swipe dont works

Comments

  • puzlpuzl The Old Firm Join Date: 2003-02-26 Member: 14029Retired Developer, NS1 Playtester, Forum Moderators, Constellation
    Firstly, you will need to tune the wait time for each weapon. If you are pressing m3 and getting a meta before acid rocket or vice versa trying changing the wait between the slot1 and the +attack.

    Here is how I'd do the above script. I haven't tested it though, just written it here in this post, so there are possibly some bugs.


    alias a1 "slot1; w; +attack"
    alias a2 "slot2; w; +attack"
    alias a3 "slot3; w; +attack"
    alias a4 "slot4; w; +attack"

    alias firstattack "slot1; w; +attack; alias firstattack +attack; alias secondattack a2; alias thirdattack a3; alias fourthattack a4"
    alias secondattack "slot2; w; +attack; alias secondattack +attack; alias firstattack a1; alias thirdattack a3; alias fourthattack a4"
    alias thirdattack "slot3; w; +attack; alias thirdattack +attack; alias firstattack a1; alias secondattack a2; alias fourthattack a4"
    alias fourthattack "slot4; w; +attack; alias fourthattack +attack; alias firstattack a1; alias secondattack a2; alias thirdattack a3"

    alias +m1 firstattack
    alias -m1 -attack

    alias +m2 secondattack
    alias -m2 -attack

    alias +m3 thirdattack
    alias -m3 -attack

    alias +m4 fourthattack
    alias -m4 -attack

    bind mouse1 +m1
    bind mouse2 +m2
    bind mouse3 +m3
    bind mouse4 +m4
  • Joe2Joe2 Join Date: 2004-09-03 Member: 31268Members
    You can also use my old script:
    <a href="http://www.unknownworlds.com/forums/index.php?showtopic=80715&st=30" target="_blank">http://www.unknownworlds.com/forums/index....80715&st=30</a>
  • Voodo_HUNVoodo_HUN Join Date: 2006-11-29 Member: 58773Members
    ok, this is what i got, and its working now:
    alias firstattack "realias2;realias3;realias4;slot1;w;+attack;alias +first +attack"
    alias secondattack "realias1;realias3;realias4;slot2;w;+attack;alias +second +attack"
    alias thirdattack "realias1;realias2;realias4;slot3;w;+attack;alias +third +attack"
    alias fourthattack "realias1;realias2;realias3;slot4;w;+attack;alias +fourth +attack"
    alias realias1 "alias +first firstattack"
    alias realias2 "alias +second secondattack"
    alias realias3 "alias +third thirdattack"
    alias realias4 "alias +fourth fourthattack"
    alias +first "realias2;realias3;realias4;slot1;w;+attack;alias +first +attack"
    alias -first "-attack"
    alias +second "realias1;realias3;realias4;slot2;w;+attack;alias +second +attack"
    alias -second "-attack"
    alias +third "realias1;realias2;realias4;slot3;w;+attack;alias +third +attack"
    alias -third "-attack"
    alias +fourth "realias1;realias2;realias3;slot4;w;+attack;alias +fourth +attack"
    alias -fourth "-attack"
    bind mouse1 +first
    bind mouse2 +second
    bind mouse4 +third
    bind mouse5 +fourth
  • GreyFlcnGreyFlcn Join Date: 2006-12-19 Member: 59134Members, Constellation
    edited January 2007
    Hrmm, I wonder how hard it'd be to slip this past blockscripts using +alias/-alias commands.

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->
    // Lol, I was bored
    alias atk1 "r2;r3;r4;slot1;wait;+attack;alias +slot1 +attack"
    alias atk2 "r1;r3;r4;slot2;wait;+attack;alias +slot2 +attack"
    alias atk3 "r1;r2;r4;slot3;wait;+attack;alias +slot3 +attack"
    alias atk4 "r1;r2;r3;slot4;wait;+attack;alias +slot4 +attack"

    alias r1 "alias +slot1 atk1"
    alias r2 "alias +slot2 atk2"
    alias r3 "alias +slot3 atk3"
    alias r4 "alias +slot4 atk4"

    r1; alias -slot1 "-attack"
    r2; alias -slot2 "-attack"
    r3; alias -slot3 "-attack"
    r4; alias -slot4 "-attack"

    bind mouse1 +slot1
    bind mouse2 +slot2
    bind mouse4 +slot3
    bind mouse5 +slot4<!--c2--></div><!--ec2-->
Sign In or Register to comment.