Binds, Commands, Cvars & Scripts
How would you create a multiple weapon bind?
Normally, you would bind a weapon like this:
bind "c" "_impulse6"
However, I want to bind multiple weapons to a single bind. Something like this:
bind "c" "_impulse6, _impulse7"
So, when "c" is pushed, it switches to weapon "impulse6", if i do not have the "impulse6" weapon, it will go to "impulse7". I have done this in Half-Life/Counter-Strike using the above syntax. I'm pretty sure you are able to do it in Quake, just not quite sure about the syntax.
Normally, you would bind a weapon like this:
bind "c" "_impulse6"
However, I want to bind multiple weapons to a single bind. Something like this:
bind "c" "_impulse6, _impulse7"
So, when "c" is pushed, it switches to weapon "impulse6", if i do not have the "impulse6" weapon, it will go to "impulse7". I have done this in Half-Life/Counter-Strike using the above syntax. I'm pretty sure you are able to do it in Quake, just not quite sure about the syntax.
be warned, using recursive vstr loops to animate your name and/or clan tag is really only for show--I wouldn't recommend enabling it during a game that you actually care about
things like weapon-switching and chatting can get delayed while they wait for the loop to cycle... it sucks to get clowned because you couldn't get the shotty out in time due to your fancy animated name
truthfully, I only came up with that shit to see if it was detrimental to servers (excess flooding of name changes from clients, etc)... it turns out servers can handle it, so I left it in my cfg--but really, it's not something I would recommend for everyday gameplay
things like weapon-switching and chatting can get delayed while they wait for the loop to cycle... it sucks to get clowned because you couldn't get the shotty out in time due to your fancy animated name
truthfully, I only came up with that shit to see if it was detrimental to servers (excess flooding of name changes from clients, etc)... it turns out servers can handle it, so I left it in my cfg--but really, it's not something I would recommend for everyday gameplay
rgoer...would it be possible for me to ask a favor...basically wondering if and when a point release get made if it would be possible to have con_notifyTime & con_speed unlocked for multiplayer, and maybe a var added to control how many lines of chat can be displayed. 
looking to basically print script options to the screen with addChatLine...and would like to print more than like 5 optons at a time...plus be able to clear them from the screen quickly once done.
con_speed mostly to echo out a help text to the console and then drop it down for view in as little time as possible.
You can see an old SoF II example of this here

looking to basically print script options to the screen with addChatLine...and would like to print more than like 5 optons at a time...plus be able to clear them from the screen quickly once done.
con_speed mostly to echo out a help text to the console and then drop it down for view in as little time as possible.
You can see an old SoF II example of this here
Nice script, something to build off of, thanks for sharing. :icon14:Nologic wrote:Well here is some thing for you guys to look over...early beta but its some thing.
autoexec.cfg 0.20 Beta
Oh if you guys go pubbing...be sure to use a different nick and tags.
PS code samples taken from nitro's & rgoer's config files.
PS, you might want to change your kill bind to "kill -1" instead of zero. "kill 0" kills the person in player spot 0, not always yourself.

If you have this fixed, try to have the coders keep the movement impulses locked (no rocketjump script, better yet, no forward rocket jump script!)rgoer wrote:I thought maybe this would work:but it doesn'tCode: Select all
seta "ua_bindRail" "bind 'x' '_impulse7; set ua_toggleRebind vstr ua_bindRocket'" seta "ua_bindRocket" "bind 'x' '_impulse6; set ua_toggleRebind vstr ua_bindRail'" seta "ua_toggleRebind" "vstr ua_bindRail" bind "x" "_impulse7; vstr ua_toggleRebind"
Yours won't work either, R00k. These stupid _impulse commands only work when they are the only thing in a key-binding. Yarr. I'll get it sorted though...
Btw, anyone know where to submit bug reports to raven ?
-
- Posts: 899
- Joined: Tue Jan 25, 2005 4:43 pm
Found a site that has a cfg generator.
I haven't tried it yet due to stuff here at home.
But thought I'd share this and try it when I
get time.
http://www.slashquit.net/q4config.sq
I haven't tried it yet due to stuff here at home.
But thought I'd share this and try it when I
get time.

http://www.slashquit.net/q4config.sq
Here's my demos script I posted yesterday, should of posted it in here I guess: 
The scripts start and stop recording with a single key.
the network script is used when your a client (playing online, etc). the server script is for singleplayer and listen servers. the scripts will save each demo with a consecutive name (demo001, demo002), except for a listen server which always saves as demo000. the server one will only display recording in the console, while the network one will diplay on your screen. unfortunately Q4 doesnt tell you your recording on your hud like q3 did. to use just change the keybind and put in your autoexec.cfg, or save each in its own .cfg file and executute them from the console (exec myscript.cfg).
enjoy.
// Q4 Network Recording script
// author: signa
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "addchatline recording_ON;recordNetDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopNetDemo;addchatline recording_OFF;set ua_record vstr ua_rec"
// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_demrecord"
set "ua_demrecord" "vstr ua_demrec"
set "ua_demrec" "echo ** RECORDING ON **;recordDemo;set ua_demrecord vstr ua_demstop"
set "ua_demstop" "stopRecording;echo ** RECORDING OFF **;set ua_demrecord vstr ua_demrec"

The scripts start and stop recording with a single key.
the network script is used when your a client (playing online, etc). the server script is for singleplayer and listen servers. the scripts will save each demo with a consecutive name (demo001, demo002), except for a listen server which always saves as demo000. the server one will only display recording in the console, while the network one will diplay on your screen. unfortunately Q4 doesnt tell you your recording on your hud like q3 did. to use just change the keybind and put in your autoexec.cfg, or save each in its own .cfg file and executute them from the console (exec myscript.cfg).
enjoy.
// Q4 Network Recording script
// author: signa
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "addchatline recording_ON;recordNetDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopNetDemo;addchatline recording_OFF;set ua_record vstr ua_rec"
// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_demrecord"
set "ua_demrecord" "vstr ua_demrec"
set "ua_demrec" "echo ** RECORDING ON **;recordDemo;set ua_demrecord vstr ua_demstop"
set "ua_demstop" "stopRecording;echo ** RECORDING OFF **;set ua_demrecord vstr ua_demrec"
Last edited by §ìgñå on Thu Oct 27, 2005 5:32 pm, edited 1 time in total.
I've gathered as much accurate info as possible and organised my autoexec a little. Thx to signa and everyone else that has contributed in 1 way or another with various scripts and commands. The demo and volume control works nicely Any input is welcome, if I have something incorrect please tell me. This cfg is dumbed down fairly, but not too much, and I have commented what I could:
Client:
http://www.ovquake.com/phpbb/viewtopic.php?t=64
Also dedicated server cfg with basic map rotation, not script mapcfg:
http://www.ovquake.com/phpbb/viewtopic.php?t=72
Client:
http://www.ovquake.com/phpbb/viewtopic.php?t=64
Also dedicated server cfg with basic map rotation, not script mapcfg:
http://www.ovquake.com/phpbb/viewtopic.php?t=72
[color=Green]I Root 4 Chaos ![/color]
The only thing I could think of is that you arent putting thecommand in the proper cfg. Do you have an autoexec.cfg? If so put it there. If not put it in your quake4cfg.cfgbusetibi wrote:im trying to bind a key to quit.
ive tried....
bind "m" "quit"
as per riddlas bind "q" "quit" sticky post,but cant get it to work,
any ideas?
ty
bind "g" "quit" //end game
[color=Green]I Root 4 Chaos ![/color]
§ìgñå wrote:Here's my demos script I posted yesterday, should of posted it in here I guess:
The scripts start and stop recording with a single key.
the network script is used when your a client (playing online, etc). the server script is for singleplayer and listen servers. the scripts will save each demo with a consecutive name (demo001, demo002), except for a listen server which always saves as demo000. the server one will only display recording in the console, while the network one will diplay on your screen. unfortunately Q4 doesnt tell you your recording on your hud like q3 did. to use just change the keybind and put in your autoexec.cfg, or save each in its own .cfg file and executute them from the console (exec myscript.cfg).
enjoy.
// Q4 Network Recording script
// author: signa
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "addchatline recording_ON;recordNetDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopNetDemo;addchatline recording_OFF;set ua_record vstr ua_rec"
// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "echo ** RECORDING ON **;recordDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopRecording;echo ** RECORDING OFF **;set ua_record vstr ua_rec"
I created a server and tried the server recording script but it didn't work for me. I'm doing something wrong. What is a listen server anyway? I made a file called serverrecord.cfg, put it in q4base, and pasted the above listen server script into it. I bound F4 to this line : bind "F4" "vstr ua_record"
I loaded the game, created my server, and then typed/executed the serverrecord.cfg in the console. Said unknown command. I pressed F4 and nothing seemed to happen. Am I meant to use the network recording script? Does a demo get saved in my demo folder? Why do I need to execute from the console if F4 is the key to record and stop?

Use the following in your autoexec.cfg:
//Demo record
bind "F5" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "addchatline recording_ON;recordNetDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopNetDemo;addchatline recording_OFF;set ua_record vstr ua_rec"
//Demo record
bind "F5" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "addchatline recording_ON;recordNetDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopNetDemo;addchatline recording_OFF;set ua_record vstr ua_rec"
[color=Green]I Root 4 Chaos ![/color]
Thanks bueller and signa. That works now. Bueller, it said recording ON and recording OFF on screen so that's fine. But I cannot find the demo anywhere in my q4 or q4base folder. And it's not in my demos folder. Where would it be? Am I meant to do something else after pressing stop record?
edit: well I was successful in doing it by going onto an empty server, typing recordnetdemo drum1.netdemo in the console, then, stopnetdemo and the file came out only 480kb for running around for about a minute. But I still can't figure out why no demo was found when I recorded on my own server.
edit: well I was successful in doing it by going onto an empty server, typing recordnetdemo drum1.netdemo in the console, then, stopnetdemo and the file came out only 480kb for running around for about a minute. But I still can't figure out why no demo was found when I recorded on my own server.
I believe I saw a 2nd demo script for a listen server from signa, which may mean there are 2 types of ways to record. I believe the 1 I posted (FROM SIGNA) will work on internet servers only and if you want to do 1 locally you would need to use the other. Maybe PM signa.
**EDIT**
Heres signa's script for local recording, difference being the word "net":
// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "echo ** RECORDING ON **;recordDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopRecording;echo ** RECORDING OFF **;set ua_record vstr ua_rec"
**EDIT**
Heres signa's script for local recording, difference being the word "net":
// Listen Server Recording script
// author: signa
// notes: singleplayer generates seperate demo files, listen server doesnt.
bind "x" "vstr ua_record"
set "ua_record" "vstr ua_rec"
set "ua_rec" "echo ** RECORDING ON **;recordDemo;set ua_record vstr ua_stop"
set "ua_stop" "stopRecording;echo ** RECORDING OFF **;set ua_record vstr ua_rec"
[color=Green]I Root 4 Chaos ![/color]
Bueller, yep, that works, but not without it's problems. For a start as dzjepp said, the files are big. One minute of recording was about 27 mb. I put the listen server script in my autoexec bound to F10, and the net recording script in a file I called netrecord.cfg bound to F11. But unless I type exec netrecord.cfg everytime I want to record client side, the listen server script kicks in and records and stops a demo (not netdemo)with either F10 and F11. But if I remove the listen server cfg then the net record.cfg works regardless. The listen server script works on my own server and also on other peoples. But of course it's crap because the files are too big. When I exec the netrecord.cfg, then F10 and F11 both record and stop netdemos. Confusing.
I have another way. I've left the listen server script on F10, and for netdemos I've done this:
bind "F6" "recordnetdemo"
bind "F7" "stopnetdemo"
That all works with no confusion. F6, F7, and F10.

I have another way. I've left the listen server script on F10, and for netdemos I've done this:
bind "F6" "recordnetdemo"
bind "F7" "stopnetdemo"
That all works with no confusion. F6, F7, and F10.
I tried this. I did alt + enter once connected to my server and clicked on Quake4.exe on my desktop, but it didn't open another instance of Q4, it said I'm already connected. I then made my server dedicated as you mentioned but all that happened was a script box came up with a load of info and then stopped. Are you talking about opening another instance on a second pc? Looks like the only way I can record on my own server is to use the listen server script and record immensely huge files.dzjepp wrote: It's a bit of a pain in the arse but you can launch a dedicated one and open a new instance of q4, and join your server so you have the light net demos.
hm thats probably because both scripts use the same alias names. I guess I never thought ppl would be using both at the same time heh.DRuM wrote:...I put the listen server script in my autoexec bound to F10, and the net recording script in a file I called netrecord.cfg bound to F11. But unless I type exec netrecord.cfg everytime I want to record client side, the listen server script kicks in and records and stops a demo (not netdemo)with either F10 and F11. But if I remove the listen server cfg then the net record.cfg works regardless. The listen server script works on my own server and also on other peoples. But of course it's crap because the files are too big. When I exec the netrecord.cfg, then F10 and F11 both record and stop netdemos. Confusing.![]()
I have another way. I've left the listen server script on F10, and for netdemos I've done this:
bind "F6" "recordnetdemo"
bind "F7" "stopnetdemo"
That all works with no confusion. F6, F7, and F10.
I rewrote the listen server script so it shouldnt interfere with the netscript.:
bind "x" "vstr ua_demrecord"
set "ua_demrecord" "vstr ua_demrec"
set "ua_demrec" "echo ** RECORDING ON **;recordDemo;set ua_demrecord vstr ua_demstop"
set "ua_demstop" "stopRecording;echo ** RECORDING OFF **;set ua_demrecord vstr ua_demrec"
Im not sure why you couldnt find that other demo, just remember whenever you record a demo with the listen script, unless your in playing singleplayer, it always saves the demo as "demo000".