Scripting


(Majin) #1

I’ve been trying to shrink the number of cfg files I use, and the size of the ones left.

One problem has come up that I can’t seem to get around, and is making my files very large and adding up lots of vstr’s I wish I didn’t have to add.

I want:

set saystuff bind KEY “say 1;say 2; say 3”

This does not work though(I tried EVERY variation of quotes possible, never worked), and I have to use the following to get that done…

set saystuff “bind key vstr saystuffV”
set saystuffV “vstr saystuff1;vstr saystuff2;vstr saystuff3”
set saystuff1 say 1
set saystuff2 say 2
set saystuff3 say 3

Version 2 is just so large, and I use it over and over again in similar situations, where I want a vstr to bind a few actions to one key.

The only way I could find to solve this, was to use a seprate cfg file and call it as I would call the vstr. This however made so many seperate cfg files that going back to edit a script became a horribly annoying task.

Any help in getting the one line version to work would be great!


(Kendle) #2

You won’t get the one-line version to work. Lots of small files is actually more efficient and reliable than big files with lots of variables and you’ll end up with a lot less variables as well.

file1.cfg
set saystuff “bind x exec file2.cfg”

file2.cfg
say 1
say 2
say 3


(Majin) #3

After using that kind of thing for 4 months I’m getting so tired of the following in the console:

executing majin/file1.cfg
executing majin/file1.cfg
Guy12 got vaporized by TheMans Panzerfaust
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
CovertManofDoom got Vaporized by TheMans Panzerfaust
TheMan was killed by SMGguys MP40
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
Allies have captured the flag!
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg
executing majin/file1.cfg


(Kendle) #4

cl_noprint 1; exec file.cfg; cl_noprint 0

stops the executing file.cfg message. :slight_smile:


(Ifurita) #5

what exactly do you want to say and does it have to be in caps?

One thing you could try is a +vstr bind, like:

bind KP_PGUP “+vstr backup haveobjective”
set backup “vsay_team needbackup”
set haveobjective “say_team ^1I have objective^3 - heading to drop off point”

See if that works


(squadjot) #6

Majin…i dont understand ur problem…

Anyways…UltraEdit can edit more than one cfg at a time… (ultimate script editor imo) :slight_smile: