donatas abraitis

QW-lang

In the past month, I managed to pickup old-school guys (I want to thank them very much) we played together 15 years ago. Yeah, it’s unbelievable fun.

Most of the time we play only FFA or 1on1 modes, but one day we managed to arrange 2on2.

LT-QW

When playing I was thinking:

  • Where my teammate is;
  • How is he doing;
  • Where he is right now?

I totally forgot how to use team play bindings, thus I decided to take a short look for myself and others(?).

Simple team play bindings are OK, but what about more advanced and automated reports?

Who says that gaming is bad for kids? They teach you programming skills ;-) That’s what I wanted to show with this blog post.

I was looking for something to report periodically my status, but no joy. Thus after a little bit of research found http://ezquake.sourceforge.net/docs/?scripting#advanced.

set null "0"
set count "0"
set attack_count "0"
...
alias -rocket "weapon 7 2 1; -attack; _attack_count_inc; if 1on1 !isin $matchname then periodic_report"
...
alias _count_inc "inc count; if $count > 40 then set count $null"
alias _attack_count_inc "inc attack_count; if $attack_count > 6 then set attack_count $null"
alias periodic_report "if $count > 30 then if $attack_count > 2 then advanced_help; if $count > 31 then if $attack_count < 2 then advanced_status"

With this advanced scripting, I was able to report my status and location periodically. Instead of timing, I’m using movement buttons to track and so simulate timing.