Knife Script

BarlowBarlow Join Date: 2005-02-10 Member: 40597Members Posts: 6
Hey, I posted this in the wrong forum before nerd-fix.gif oops.

Ive just about managed to fix the original problem that I had which was that it didn't work... at all tounge.gif

Like I said in the other post, my game of choice is DoD, and in that I have a script whereby when you press the mousewheel (mouse3) down I get out my knife/spade and attack with it until I release the button, it then switches back to my last weapon.

Now the problem I have with this script is that it seems to switch to knife no problem, and attack no problem. but... when mouse 3 is released I cant seem to get it to switch back to the last weapon I had out at the time. I minor problem, but a problem nonetheless. I have to impulse 1 it back to whatever weapon I have in slot 1 as 'lastinv' doesnt seem to work. I have hudswitch set as 1 if this makes a difference.

Any help would be greatly appreciated.

Here it is:

QUOTE
alias "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
alias "-getmaknife" "-attack;wait;impulse 1"

Comments

  • ThreeLeggedSkulkThreeLeggedSkulk Join Date: 2005-01-18 Member: 36305Members Posts: 15
    QUOTE (Barlow @ Feb 11 2005, 08:47 AM)
    QUOTE
    alias "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
    alias "-getmaknife" "-attack;wait;lastinv"

    smile-fix.gif
    #obs-ns
    obs.idian <jeenyus>
  • BarlowBarlow Join Date: 2005-02-10 Member: 40597Members Posts: 6
    The 'lastinv' doesnt seem to do anything, it doesnt switch back to anything when I have it there, it just stays on the knife. sad-fix.gif
  • motsewmotsew Join Date: 2003-10-26 Member: 22001Members Posts: 56 Fully active user
    here's another way of doing it :

    press 3, press mouse1, press q

    easy peasy !
  • DragonMechDragonMech Join Date: 2003-09-19 Member: 21023Members, Constellation, Reinforced - Shadow Posts: 6,781 Fully active user
    Try adding another 'wait' or two in the -getmaknife command.
    I see custom titles. <_< >_>

    QUOTE (DOOManiac @ Jul 10 2005, 07:00 PM)
    I for one can't imagine downloading several gigs of pornography from a typewriter.
  • Swift_IdiotSwift_Idiot Join Date: 2003-01-05 Member: 11883Members Posts: 862
    I think I can come up with a script for this. I already have one that switches back to the LMG. I don't know if that's an ok alternative to lastinv.

    PS mot stay out of our forum plz
    RUE4<3? ;D
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver Posts: 708 Advanced user
    edited February 2005
    CODE
    alias "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
    alias "-getmaknife" "-attack;wait;slot1"


    since, in ns, your last used weapon is almost always slot1 (lmg, sg, hmg or gl), just do this. then hit 2 for the pistol if you really want.

    Alternatively, if you use a scripted lastinv, like romanos, you can just call something from inside the script that will switch you back.
    Jumping send out a big hank cyclone, it will eddy original location in gallinaceous body, and pinch three times, opponent
  • ReKReK Join Date: 2004-08-30 Member: 31058Members, Constellation, Reinforced - Shadow, WC 2013 - Silver Posts: 708 Advanced user
    edited February 2005
    Double post
    Jumping send out a big hank cyclone, it will eddy original location in gallinaceous body, and pinch three times, opponent
  • UrdUrd Join Date: 2003-05-25 Member: 16696Members, Constellation Posts: 313
    CODE
    alias "+getmaknife" "weapon_knife;wait;wait;wait;wait;+attack"
    alias "-getmaknife" "-attack;wait;lastinv;lastinv"

    You need 2 lastinv commands for it to work, not sure why.
  • Krazy_GlueKrazy_Glue Join Date: 2003-05-16 Member: 16393Members Posts: 69
    my script uses lastinv fine...

    CODE
    alias +knife "slot3; wait; +attack"
    alias -knife "-attack; wait; lastinv"
    bind <key> +knife


    mabey its because i use slot3...
  • BarlowBarlow Join Date: 2005-02-10 Member: 40597Members Posts: 6
    Hmmm. Cheers for all the help guys. The 2 'lastinv' commands only seems to work if i swap from lmg to pistol and then press mouse3. I'll try that one bound to slot 3 smile-fix.gif
Sign In or Register to comment.