Age :37
Group: Administrator
Location: Portugal
Started playing Quakeworld in 1997. Always been active in the community. With strong opinions about the game and the path it should follow, always fought the conservative qw ideals. Lately has been involved in bringing new players into the game, making their life easier and promoting different game modes and maps.

know more @ http://wiki.quakeworld.nu/Mushi
Guides  /  14 Mar 2013, 18:24
T&T #6 Timer script with Switch
Powerups play an important role in any fps. Since the dawn of time (1997) players have their own tactics of knowing the respawn times of each one of them. Some used stopwatches, some played a sound that lasted 60 seconds for quad and 5m for penta/ring... Among other creative solutions
Later the fps community evolved and gameclock was no longer considered a cheat, so everyone started using it.
Even later, around 2006 maybe, someone came up with the idea of using the existing features in ezQuake and made timer scripts. Basically, when the player knows the second that a given powerups spawns, he defines the number he wants to show to teammates, then include it in "say_team get quad at <number>". The number is between 0 and 59 and represents the second that the powerup spawns.
The script that I will talk about below is an improvement of the original one. The script is a couple of lines only. The downside of this script is that you can only set one number at a time, and it will only be functional to your teammates if everyone's gameclock counts in the same direction (either up or down) but it is simple to configure. There are more complex scripts in the forum that don't have these disadvantages, but what the hell This is good enough to start.

So, I will show you how to use the timer script (below) with a switch key. Before that, let me explain what it does:
Most of my multi bind keys are related to the timer script. When i'm pressing the switch key (TAB), the following keys are binded to (the regular bind is in italic):
  • mouse wheel up -> increases the numeric variable; shoots SG
  • mouse wheel down -> decreases the numeric variable; shoots SSG
  • 4 -> say_team "Get Quad at <number>"; say_team get Quad
  • 5 -> say_team "Get Pent at <number>"; say_team get Pent
  • e -> say_team "RL at <number>"; say_team Cancel that
  • r -> say_team asks teammates for enemy positions (i use it when i have quad); say_team Coming


Note that 4 and 5 are always related to Quad and Pent respectively. In nowadays timer scripts the mouse wheel is used to set the exact number.
With the switch key, you can continue to use the mouse wheel like you always did, but it also can set the timer. I applyed the same logic to the get quad and get pent keys. I added a get RL at <number> as well, as it is crucial in e1m2 for example. And I also added a key to ask for positions.

Now, the script. It's a simple script that is available on the forum:

set timer 0
alias uptime "if $timer == 59 then set timer 0 else inc timer 1;echo ^t^i^m^e :$timer"
alias downtime "if $timer == 0 then set timer 59 else inc timer -1;echo ^t^i^m^e :$timer"


You can bind these directly to your mouse wheel, but you probably you have something else binded there (that's why i'm gonna show you how to use switch keys). Anyway, here's how:
bind MWHEELUP "uptime"
bind MWHEELDOWN "downtime"


And of course, its recommended to create your own aliases for simplicity. Something like:

alias getquadtimer "say_team $\$nick QUAD on :{$timer}"
alias getpenttimer "say_team $\$nick PENT on :{$timer}"
alias getrltimer "say_team $\$nick RL on :{$timer}"


So there it is, a very simple timer script.

How to use this in a switch alias? You got to have a switch alias. To know more, read my last blog entry. Once you have it, you have to modify it to suit your needs. Basically, you got to insure that what you change when you are pressing the (switch) key gets changed back to what it was when you release it.

//Press key - add the bold text:
alias +switch "con_notifylines 2; +showteamscores; bind SPACE _trick; bind MOUSE2 _packs;bind 4 "getquadtimer"; bind 5 getpenttimer; bind e getrltimer";bind MWHEELUP uptime; bind MWHEELDOWN downtime;

//Release key: and add your regular binds to the same keys:
alias -switch "con_notifylines 5; -showteamscores; bind SPACE +jump ; bind MOUSE2 +lg; bind 4 _getquad; bind 5 _getpent; bind e _cancel; bind MWHEELUP +sg bind MWHEELDOWN +ssg;"
// the bind for the switch key:
bind TAB +switch


TIP:
Always backup your config. If you want to have extra careful when changing it, I recommend creating a separate text file, and place it on /qw folder. Paste the script and the desired binds and aliases to that new text file and save it. Execute nQuake, load your config and join a server (can be localhost - just type map dm6). Execute the text file, typing exec <complete filename>. Now test the changes. If the new aliases behave correctly, save your config with cfg_save. If they don't, quit nQuake and repair what is wrong.
This way you config is always secured.

So there it is. A simple timer script for any weapon/powerup. There are numerous improvements out there, but this is the basic. Now you know how the enemy team always is at quad when it spawns


Back to T&T index
Comments
2013-03-20, 01:18
ty! just tested and works like a charm
2013-03-20, 20:03
cool!
switch keys are nice because it enables you to rethink your binds
2013-03-24, 19:33
I had the timer script before but it got lost in between computer switches and Quake reinstallations. Now added it again after this guide and it feels nice to have it in mixes.

Some small feedback:
- ezQuake has a cl_fakename variable that decides what name is used in the ezQuake built-in messages. This can also be used for one's own aliases to avoid having a separate $nick variable. Just change it from $nick to $cl_fakename.
- I think making the script more generic by changing it to "<powerup> delayed by x seconds" is recommended so the awkward people with the clock counting down also can make use of the information automatically.
You have to be logged in to be able to post a comment.
Username:
Password: