|
Post by Çhêê©h on Jun 21, 2006 18:34:43 GMT -5
vstr is another powerful way to create a toggle switch... previously we used external .cfg files to store the toggle information so that a bind would execute two seperate .cfg files to create a single toggle. with vstr we can create the same toggle effect, except it can be nested in a single .cfg file, which can host multiple vstr toggles.
here's an example of how a vstr can be used to set up and execute a useful toggle.
create a .cfg and call it forcemodel.cfg and paste in the following
///forcemodel toggle
bind x "vstr fm"
set fm "vstr fm_1" set fm_1 "cg_forceModel 1; echo Force Model ^2ON; set fm vstr fm_0" set fm_0 "cg_forceModel 0; echo Force Model ^5OFF; set fm vstr fm_1"
place the file in your gamedata>base folder, now all you you have to do is exec the file and you're good to go. the x key should switch between forcemodel being off/on.
|
|
|
Post by ÇhümÞ on Jun 25, 2006 5:44:10 GMT -5
you can do this with autistic mode too
bind a "vstr am" set am_1 "say !autistic mode; wait 158.2; say ^7chat messages ignored; echo chat messages ignored; cg_chatbox 0; set am vstr am_0"
set am_0 "say !normal mode; wait 158.2; say ^7chat messages enabled; echo chat messages enabled; cg_chatbox 10000; set am vstr am_1"
|
|
|
Post by Çhêê©h on Jun 25, 2006 21:10:04 GMT -5
word! good shit man
|
|
|
Post by *Jenny* on Jun 26, 2006 12:32:44 GMT -5
Cool, I've been wandering how to use VSTR for quite awhile O.o
I want to make a thread about some commands I know, but I can't >.<
I'll just mention them here.
For all of you Dark Forces Fans out there, and for anyone who wants more space on their screen, you can get a Dark Forces looking HUD. Type cg_hudfiles 1, and be happy? ^^
You can also move your chatbox's location vertically. The bottom of the chatbox is decided by cg_chatBoxHeight #, the higher the number, the lower the chatbox is on your screen.
The Chatbox can also be changed by how long you want messages to be displayed. cg_chatbox # determines hows long in mileseconds a message is displayed, default is 10000 (10 seconds), I set mine to 3000 (3 seconds)
|
|
|
Post by Çhêê©h on Jun 26, 2006 15:44:39 GMT -5
thanks for your contributions jenneh :D
i believe there is more that can be done with vstr, in addition to the togglez. i've seen some pretty elaborate ones, i think one dood had set up a vstr to work like jams music player, got it to cycle through his entire music collection.. oh wow man! and if you poke around in the config files that the testers used for this game they have some other things they used vstrs for, but i cant remember off the top of teh head.
what i'm really interested in atm, is how kt scripts are used to say peeples names. i dove into some bot scriptz cause they dew that too. they had some strange code that looked something like %a and %c etc where the persons name would go. i tried using that but it didn't dew anything. i haven't had any lux opening up jams kt to find out how jams did it. its just a total fuggin head scratcher for me..
cause it would be pretty cool to be able to say some shit u know if someone is shining u on, you could rub their nose in it. cause no one likes it when the family pet craps in the living room.
|
|
|
Post by Çhêê©h on Jun 26, 2006 16:18:03 GMT -5
so long as were sharing code stuffz, theres another thing i like to do besides turning off chat box. if you're completely in the zone it can be nice sometimes to put on a 'lil music and switch to Super Autistic Mode™ you'll feel just like rain man ;)
try cg_draw2d 0,
cg_draw2d 1 will switch it back.
this is also nice for taking screenies
|
|
|
Post by Smoo on Apr 1, 2008 22:22:47 GMT -5
ive known all this before but very nice tutorials! high five! lol
|
|