Weaponswitch Script

VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
I know Q3 but no HL
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:
CODE

set d1 "slot1; bind ctrl vstr d2"
set d2 "slot3; bind ctrl vstr d1"
bind n "vstr d1"


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 Members, NS1 Playtester, Contributor, Constellation Join Date: 2003-05-18 Member: 16446Posts: 5,602
    change set to alias and it should work i think
  • KaineKaine Members, Constellation Join Date: 2002-08-07 Member: 1096Posts: 1,018
    CODE
    set d1 "slot1; bind ctrl vstr d2"
    set d2 "slot3; bind ctrl vstr d1"
    bind n "vstr d1"


    should be

    CODE
    alias d1 "slot1; bind ctrl d2"
    alias d2 "slot; bind ctrl d1"
    bind n "d1"


    try that smile.gif
    IPB Image g0t constie?
  • funbagsfunbags Members Join Date: 2003-06-08 Member: 17099Posts: 1,536
    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.
    QUOTE (OttoDestruct @ Jun 13 2005, 06:37 PM)
    QUOTE (AllUrHiveRblong2us @ Jun 13 2005, 06:34 PM)
    how does anyone like anyone?

    Boobs.

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

    CODE

    alias d1 "weapon_leap; alias d3 d2"
    alias d2 "weapon_bitegun; alias d3 d1"
    alias d3 "d1"
    //bind <key> d3


    Also the use of the third alias will let you bind it to any key without having to change the aliases.
  • KaineKaine Members, Constellation Join Date: 2002-08-07 Member: 1096Posts: 1,018
    QUOTE (funbags @ Apr 11 2004, 08:54 PM)
    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.

    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 wink.gif
    IPB Image g0t constie?
  • UrdUrd Members, Constellation Join Date: 2003-05-25 Member: 16696Posts: 313
    QUOTE (funbags @ Apr 11 2004, 03:54 AM)
    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.

    And no, it doesn't automaticly switch; he still has to press the button. It's pretty much the same as using lastinv.
  • VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
    Thanks for the help so far. I'll try that one Urd noted out.
  • funbagsfunbags Members Join Date: 2003-06-08 Member: 17099Posts: 1,536
    then why cant he do leap, then press 1 and bite?
    QUOTE (OttoDestruct @ Jun 13 2005, 06:37 PM)
    QUOTE (AllUrHiveRblong2us @ Jun 13 2005, 06:34 PM)
    how does anyone like anyone?

    Boobs.

    ZOMG YOU FOUND MY WEAKNESS! BOOBS <3
  • GodhandGodhand Members Join Date: 2003-08-02 Member: 18737Posts: 311
    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?"
    Pardon my poor english. im from the south ^.~

    Read name as "Shinja-God" the "hand" is silent, and the shinja is implied.
  • VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
    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 Members, Constellation Join Date: 2003-05-25 Member: 16696Posts: 313
    edited April 2004
    What, mine doesnt work?

    Work's when i tested it. :/
  • VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
    Must be my fault. I know that //bind <key> d1 is a note, i assume i am supposed to bind that manually?
  • UrdUrd Members, Constellation Join Date: 2003-05-25 Member: 16696Posts: 313
    Yes your supposed to bind it ingame, and note: if you try to use it while holding down the trigger, it wont work.
  • SpritzSpritz Members Join Date: 2004-04-04 Member: 27723Posts: 5
    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 smile.gif
  • UrdUrd Members, Constellation Join Date: 2003-05-25 Member: 16696Posts: 313
    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. wink.gif
  • TrayderTrayder Members, Constellation Join Date: 2003-10-30 Member: 22127Posts: 324
    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 mad.gif
    IPB Image .SST. Trayder
  • UrdUrd Members, Constellation Join Date: 2003-05-25 Member: 16696Posts: 313
    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~. nerd.gif
  • VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
    YAY IT WORKS!

    Erm, Urd ur sig, the [NSA] part....is that a clan?
  • Dorian_GrayDorian_Gray Members, Constellation Join Date: 2004-02-15 Member: 26581Posts: 1,027
    NSA = NS Arms Lab
    user posted image
    user posted image Get Firefox (a.k.a. BSHax)
  • VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
    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 Members Join Date: 2004-04-11 Member: 27845Posts: 20
    Hi, its me again smile.gif.

    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 Members Join Date: 2003-05-30 Member: 16866Posts: 1,198
    QUOTE (funbags @ Apr 11 2004, 09:54 AM)
    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.

    Well said confused.gif
    user posted image
  • MintmanMintman Members Join Date: 2003-05-30 Member: 16866Posts: 1,198
    edited July 2004
    QUOTE (Virushunter @ Jul 21 2004, 06:42 AM)
    Hi, its me again smile.gif.

    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.

    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: http://www.unknownworlds.com/forums/in...showtopic=74222
    user posted image
  • VirushunterVirushunter Members Join Date: 2004-04-11 Member: 27845Posts: 20
    Nope, i tried those but they didnt work.
Sign In or Register to comment.