Little Problem ...

JuasiJuasi Join Date: 2005-02-26 Member: 42520Members
edited March 2005 in Scripting Discussion
Hiya everyone I'm not posting often (or maybe I did not post at all here) ...

I got a little question ...

I made this little "toggle" script (I know, my scripting is not very good <!--emo&:p--><img src='http://www.unknownworlds.com/forums/html/emoticons/tounge.gif' border='0' style='vertical-align:middle' alt='tounge.gif' /><!--endemo-->) but ... What did I do wrong ? It NEVER work even on Local (with Blockscript disabled of course) ...

<!--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-->//==========================================================
//
// funcRun (Toggle On/Off)
//
//==========================================================
bind "SHIFT" "funcRun"
alias varRunOn "+speed"
alias varRunOff "-speed"

alias funcRun "funcRunOn"
//alias funcRunOn "+speed; alias funcRun funcRunOff"
//alias funcRunOff "-run; alias funcRun funcRunOn"
alias funcRunOn "varRunOn; alias funcRun funcRunOff"
alias funcRunOff "varRunOff; alias funcRun funcRunOn"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

I mean ... What did I do wrong !?
I also tried to directly use "+speed" in funcRunOn and "-speed" in funcRunOff ... Yet it does not work ?

Thank you for help!

EDIT: A bit off-topic but this does not work either ...

<!--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-->//==========================================================
//
// Healing Spray (Toggle On/Off)
//
//==========================================================
bind "MOUSE2" "funcHealingSprayOn"
alias funcHealingSprayOn "weapon_healingspray; bind MOUSE2 funcHealingSprayOff"
alias funcHealingSprayOff "lastinv; bind MOUSE2 funcHealingSprayOn"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->

No idea why ... Too longs alias' names?

Comments

  • MrRadicalEdMrRadicalEd Turrent Master Join Date: 2004-08-13 Member: 30601Members
    the run toggle works for me; except that when using the other pair of aliases it shouldn't be -run, but -speed

    As for the other script the same toggle premise applies.. it works so the problem is unique to you. Also you should make it a habbit to not include binds where aliases can take their place.
  • JuasiJuasi Join Date: 2005-02-26 Member: 42520Members
    Okay, thanks MrRadicalEd.
  • MrRadicalEdMrRadicalEd Turrent Master Join Date: 2004-08-13 Member: 30601Members
    I know that I didn't really help any, but the toggle does work.. so, for your own sake, you might want to put in some echo messages to see if any of the aliases are being used or totaly absent. Atleast that's a start
  • JuasiJuasi Join Date: 2005-02-26 Member: 42520Members
    edited March 2005
    Well, about the Echo ...

    It does not work for me, lol.
    And I just don't like them much ...

    I guess I'll put them to check if it work on not. But remove later... </3 Them ...
    Never knowing where to put thoses, plus it messes up everything when I read the script. xD

    Except last time I played NS my scripts was just working fine ... xD
  • MrRadicalEdMrRadicalEd Turrent Master Join Date: 2004-08-13 Member: 30601Members
    I meant using echo as a sort of diagnostic tool..
  • bmdavllbmdavll Join Date: 2004-09-13 Member: 31682Members
    <!--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-->//==========================================================
    //
    // funcRun (Toggle On/Off)
    //
    //==========================================================
    bind "SHIFT" "funcRun"
    alias funcRun "funcRunOn"
    alias funcRunOn "+speed; alias funcRun funcRunOff"
    alias funcRunOff "-speed; alias funcRun funcRunOn"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    This should run just fine. I changed the code to put +/-speed directly in funcRunOn/Off--no need for alias. You wouldn't be able to use this toggle in a bs_1 server anyway, regardless of whether you alias +speed seperately.

    <!--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-->//==========================================================
    //
    // Healing Spray (Toggle On/Off)
    //
    //==========================================================
    bind "MOUSE2" "funcHealingSprayOn"
    alias funcHealingSprayOn "weapon_healingspray; bind MOUSE2 funcHealingSprayOff"
    alias funcHealingSprayOff "lastinv; bind MOUSE2 funcHealingSprayOn"<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    This should work unchanged. Since it should work in theory I think NS is not loading your scripts. Check to see that you have the line exec userconfig.cfg in your config.cfg, and put your scripts in userconfig.cfg in your NS folder. Or you can just put it directly in config.cfg, but I like to keep them seperate. Incidently, since the Healing Spray is only for gorge, you might want to toggle that too:

    <!--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 gorge_toggle "gorge"
    alias gorge "bind MOUSE2 funcHealingSprayOn; alias gorge_toggle notgorge"
    alias notgorge "bind MOUSE2 *; alias gorge_toggle gorge"
    bind x "gorge_toggle"
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
    (where * is what you bind mouse2 to normally and x is to toggle gorge)
  • JuasiJuasi Join Date: 2005-02-26 Member: 42520Members
    bmdvll, I use thoses "variables" because I'm a bit more used to them than "+speed" and stuff...

    And I am doing perma-gorging all the time.

    My scripts are just simple, just that it does not run at all with the newest version of NS right now ... (No idea why.)

    Thanks for help MrRadicalEd and bmdavll.
  • niftyguyniftyguy Join Date: 2003-11-13 Member: 22812Members
    edited March 2005
    First of all... if you want this healing spray toggle to attack... you have to tell it to... here I added in attack toggles for you:

    <!--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-->
    //==========================================================
    //
    // Healing Spray (Toggle On/Off)
    //
    //==========================================================
    bind "MOUSE2" "funcHealingSprayOn"
    alias funcHealingSprayOn "weapon_healingspray;wait;+attack;bind MOUSE2 funcHealingSprayOff"
    alias funcHealingSprayOff "-attack;wait;lastinv; bind MOUSE2 funcHealingSprayOn"
    <!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
Sign In or Register to comment.