Wolfenstein Enemy Territory

Learn Wolfenstein ET from the Inside Out!

TwitterMy ImageMy Image
admin On April - 25 - 2010

Wolfenstein ET: A vstr Cycle

This is a script type I had been searching for a long time when I was a newbie, it’s used alot in configs, so pay attention!

So imagine we want to create a cycle that will change our name every time we press “H”.
(BEWARE: PunkBuster kicks for too many namechanges!)

We will have to create the bind itself, then we need to set what the bind will do and then we need to set the vstrs of it,
sounds complicated and long, but  it is mostly the same.

Also notice you can add as many lines as you want. Try to see the pattern.
bind H “vstr NameCycle”
set NameCycle “vstr name1″ (this line will be changed automaticly every time you press H)
set name1 “name Trooper; set namecycle vstr name2″
set name2 “name Troopa; set namecycle vstr name3″
set name3 “name DTDM_FTW; set namecycle vstr name4″
set name4 “name troopzilla; set namecycle vstr name1″
(the last line redirects to the first line to keep the cycle going on into infinity)

So I set the button in a bind to execute the cycle. Every time we press the button, the cycle will go 1 step ahead.
On the 2nd line  we set the vstr we mentioned in the bind on the 1st line. We make this vstr launch the first part of the actual cycle.
On the 3rd line we set the 1st part of the cycle, the one we mentioned on line 2. In this current line we add what the part of the cycle should do, so changing our name and then we add a piece to make the bind ready to do the next part of the cycle when it’s pressed again.
You can keep adding lines, but I recommend using a word with numbers like name1 2 3 … because you keep structure then.
The last line must ALWAYS direct to the first vstr in the cycle, if you named them cleanly it should be the one with number 1 at the end.

Next Chapter

Be the first to like.

GD Star Rating
loading…

A vstr Cycle, 5.0 out of 5 based on 2 ratings

Categories: Featured, Scripting Guide
  • Dov*

    This can also be done with “vsay Hi Hello” instead of the name command right?

    GD Star Rating
    loading...
    • admin

      Yes, you can use any command instead of the “name” one.
      Be aware that you could get muted if you press the button too quickly and thereby spam :)

      GD Star Rating
      loading...
  • Drifty

    Can you use 2 vstr cycles in one cfg?
    My question is, can you give the cycle a name so it is unique?

    I got this now, but not sure it it works for both cycles.

    1 >>
    set spawn0 “setspawnpt 0; set cycle vstr spawn1; echo ^7spawning at ^7spawn point 0″
    set spawn1 “setspawnpt 1; set cycle vstr spawn2; echo ^7spawning at ^7spawn Point 1″
    set spawn2 “setspawnpt 2; set cycle vstr spawn3; echo ^7spawning at ^7spawn Point 2″
    set spawn3 “setspawnpt 4; set cycle vstr spawn0; echo ^7spawning at ^7spawn Point 4″

    set cycle vstr spawn0
    bind F4 vstr cycle

    2 >>
    set sniper0 “com_maxfps 71 ; sensitivity 4 ; m_pitch 0.035; set cycle vstr sniper1; echo ^7Sniperscript on”
    set sniper1 “com_maxfps 125 ; sensitivity 1.4 ; m_pitch 0.022; set cycle vstr sniper0; echo ^7Sniperscript off”
    set cycle vstr sniper0
    bind t vstr cycle

    Will it execute both vstr’s, or just one that is pushed first?

    Greets.

    GD Star Rating
    loading...
    • admin

      To be honest I never tried using 2 vstr cycles with the same name at the same time.
      But probably the sniper one will be used if you press f4 or T, just because it’s more at the bottom of the cfg and Wolfenstein reads it later than the spawn script and overwrites it.

      If you want it to work separately, you should swap any “cycle” (the word itself) you see with something like “cycle2″

      Like this:

      set sniper0 “com_maxfps 71 ; sensitivity 4 ; m_pitch 0.035; set cycle2 vstr sniper1; echo ^7Sniperscript on”
      set sniper1 “com_maxfps 125 ; sensitivity 1.4 ; m_pitch 0.022; set cycle2 vstr sniper0; echo ^7Sniperscript off”
      set cycle2 vstr sniper0
      bind t vstr cycle2

      GD Star Rating
      loading...
      • Drifty

        Oky thanks, so cycle2 is possible.
        Tested this and it works.
        So basically, I could set as miuch as cycles as i want
        if i give it a unique name like cycle2, cycle3, etc?

        thanks for the effort to give a response.

        GD Star Rating
        loading...
        • admin

          Exactly! Any name will work as long as it’s different :)

          GD Star Rating
          loading...
  • Legado_fsb

    hi, I would like to know if you can make a bind that change the weapon after last shoot to another weapon…when tompson last shoot was did, change to colt without press other botton..only hold de mouse1(attack)…can you do it??
    please help…and thanks

    GD Star Rating
    loading...
    • admin

      The scripting system we can use doesn’t have the ability to see how many bullets there are in your weapon. This means your request could be done, but only within a custom mod like Jaymod running on a server.
      So actually it is possible, but not for you personally.

      In other words, no you cannot do this yourself.

      Try playing around with settings like auto change weapon. Otherwise you’ll have to bind a button to swap between the colt and thompson, eventhough that’s not what you wanted.

      I wish I could script this for you, but it is impossible :)

      - WolfensteinET Admin

      GD Star Rating
      loading...
    • Anonymous

      The scripting system we can use doesn’t have the ability to see how many bullets there are in your weapon. This means your request could be done, but only within a custom mod like Jaymod running on a server.So actually it is possible, but not for you personally.
      In other words, no you cannot do this yourself.
      Try playing around with settings like auto change weapon. Otherwise you’ll have to bind a button to swap between the colt and thompson, eventhough that’s not what you wanted.
      I wish I could script this for you, but it is impossible 
      - WolfensteinET Admin

      GD Star Rating
      loading...
      • Legado_fsb

        thanks for help…
        and how can I do a bind to use one button to swap betwen colt and thompson…I just play for one year and somethings is hard to me…lol
        and if you do it, do I can use de same command for luger and MP40( I think I will have to use other button) but if this is possible, use only one bind to do it.

        GD Star Rating
        loading...
        • Anonymous

          There are 2 options, the most simple one makes you switch between the 2 weapons you used the last.

          /bind mouse3 weaplastused

          That’d mean if you hold the luger and switch to the mp40 manually, then pressing mouse3 would switch it back to the luger and if you press again it changes to mp40 and so on …

          The other option is a more complex script, it works for both allies and axis without using another script.

          bind mouse3 “vstr weapswap”

          set weapswap “vstr weap1″

          set weap1 “weaponbank 3; set weapswap vstr weap2″

          set weap2 “weaponbank 2; set weapswap vstr weap1″

          GD Star Rating
          loading...

About Us

This is the unofficial site of Wolfenstein Enemy Territory. You will be able to find resources like cool screenshots and configs here, but also tutorials to get the maximum out of your game. If there is anything you wish to ask or if you have any advice... Just post a comment on an article or contact us through the Contact form. V57!

Recent Comments