Binds, Commands, Cvars & Scripts

User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Post by Foo »

Info added to the Console page over at Q4W.
"Maybe you have some bird ideas. Maybe that’s the best you can do."
― Terry A. Davis
Madvil
Posts: 14
Joined: Tue Oct 18, 2005 4:31 pm

Post by Madvil »

It might be posted already but what's the command to hide the weapon model? ^.^
The only thing necessary for evil to thriumph is for good men to do nothing.
User avatar
DooMer
Posts: 3067
Joined: Thu Dec 23, 1999 8:00 am

Post by DooMer »

ui_showgun 0
Madvil
Posts: 14
Joined: Tue Oct 18, 2005 4:31 pm

Post by Madvil »

Thanks :D
The only thing necessary for evil to thriumph is for good men to do nothing.
Azer
Posts: 117
Joined: Mon Sep 17, 2001 7:00 am

Post by Azer »

<- newbie

Why doesn't the console open with the ~button :icon33:
Fjoggs
Posts: 2555
Joined: Fri May 03, 2002 7:00 am

Post by Fjoggs »

com_allowconsole "1"

or else you have to hold ctrl+alt aswell.
spookmineer
Posts: 506
Joined: Fri Nov 29, 2002 8:00 am

Post by spookmineer »

aasStats shows AAS stats

What does this ^ mean? As Q4 doesn't have MP bots, does the aas relate to something else?
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

aas is used by the single-player monster AI

some people didn't trim the extraneous crap out of their cfgs, so the cfgs going around as cvarlists have a lot of the SP stuff in there
§ìgñå
Posts: 210
Joined: Sat Jan 01, 2000 8:00 am

Post by §ìgñå »

Here are some more _impulse's. found some of them buried in a pk4 file. some of them I havent tested.

_impulse commands:

0 - gaunlet
1 - machinegun
2 - shotgun
3 - hyperblaster
4 - grenade launcher
5 - nailgun
6 - rocket launcher
7 - railgun
8 - lightning gun
9 - dark matter generator

13 - reload
14 - next weapon
15 - prev weapon

17 - Ready to play
18 - center player view
19 - Scoreboard / Show Objectives
20 - Toggle team
21 - Toggles Waiting Room / Spectator for Tourney
22 - Spectate

28 - vote yes
29 - vote no
50 - use flashlight
Mogul
Posts: 1635
Joined: Wed May 23, 1973 12:48 pm

Post by Mogul »

OK, so how would you go about setting it up so that each weapon has its own crosshiar color? I'm sorry to be asking folks to do the dirty work for me, but I've never really used scripts before, since in the past, regular old double binding was possible.
This line only remake is total rubbish I've ever seen!!! Fuck off!!! --CZghost
Recoil
Posts: 2
Joined: Thu Oct 20, 2005 9:06 am

Post by Recoil »

You can't, seems in doom3 & quake4 you can't set/alias a command with any _impulses in it, they are not recognized, same way you type in _impulse7 in the console, and it's an unrecognized command, but if you bind it to a key, and press that key, it magically works.

probably some form of anti-quickscripting, much to my dismay =\

i really hope someone finds a workaround for this.

so as is, _impulseX only works when bound by itself to a key.

anyone got a way to circumvent this? =\
Oeloe
Posts: 1529
Joined: Fri Mar 19, 2004 8:00 am

Post by Oeloe »

That sucks. :( Luckily i don't use drawgun 0 and different sens for different weapons in Q3. Real double binding (holding an already binded key together with another to give it another function) would be even nicer than multiple commands i.c.w. weapon selection commands (which is obviously required too). I hope this reached Id/Raven and that they will do something about it...
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

If vstr type cycling isn't available for weapons binds, you could always use something like this:

imp4.cfg:
bind "x" "_impulse5; exec imp5.cfg"

imp5.cfg:
bind "x" "_impulse4; exec imp4.cfg"

Getting the weap binds to work at all right now seems to be the problem though.
User avatar
MKJ
Posts: 32581
Joined: Fri Nov 24, 2000 8:00 am

Post by MKJ »

or use the ua_ thing rgoer posted
[url=http://profile.mygamercard.net/Emka+Jee][img]http://card.mygamercard.net/sig/Emka+Jee.jpg[/img][/url]
Mogul
Posts: 1635
Joined: Wed May 23, 1973 12:48 pm

Post by Mogul »

I figure that the ua_ thing is the way to go, but I still have no clue how to get it to switch weapons and change the crosshair color simultaneously.
This line only remake is total rubbish I've ever seen!!! Fuck off!!! --CZghost
rgoer
Posts: 798
Joined: Sun Aug 17, 2003 7:00 am

Post by rgoer »

I thought maybe this would work:

Code: 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"
but it doesn't

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...
Mogul
Posts: 1635
Joined: Wed May 23, 1973 12:48 pm

Post by Mogul »

Good news man. Thanks.
This line only remake is total rubbish I've ever seen!!! Fuck off!!! --CZghost
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

Mogul wrote:Thanks.
:icon14:
Mogul
Posts: 1635
Joined: Wed May 23, 1973 12:48 pm

Post by Mogul »

I was talking to rogz0r.
This line only remake is total rubbish I've ever seen!!! Fuck off!!! --CZghost
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

I know, so was I.
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

UpsetChaps has this to say, but it's a pretty shoddy workaround:




Quake 4 appears to restrict commands preceded by a _ and allows one _command per bind, this obviously causes problems when scripting.


Weapon Cycle Script
To overcome the single _command per bind (and what appears to be restricted use of _commands in scripts) and until we find a better way here's a very crude workaround; not very usable to be honest.

Use mouse up to cycle explosive weapons, middle mouse button to cycle rapid fire weapons, mouse down to cycle slow fire weapons. To overcome the single command per bind (and restricted use of _commands in scripts) you need to confirm your weapon selection after cycling by pressing W.


//Requ!em: ugly/bodged quick select weapon 'alias' replacement
//Adapted from a Quake3 script by Aqua of UpsetChaps
set SelectExplosive1 "bind w _impulse5;echo "weapon 5";set SelectExplosive vstr SelectExplosive2"
set SelectExplosive2 "bind w _impulse7;echo "weapon 7";set SelectExplosive vstr SelectExplosive3"
set SelectExplosive3 "bind w _impulse8;echo "weapon 8";set SelectExplosive vstr SelectExplosive1"
set SelectExplosive "vstr SelectExplosive1"

set SelectRapidFire1 "bind w _impulse3;echo "weapon 3";set SelectRapidFire vstr SelectRapidFire2"
set SelectRapidFire2 "bind w _impulse4;echo "weapon 4";set SelectRapidFire vstr SelectRapidFire3"
set SelectRapidFire3 "bind w _impulse5;echo "weapon 6";set SelectRapidFire vstr SelectRapidFire1"
set SelectRapidFire "vstr SelectRapidFire1"

set SelectSlowFire1 "bind w _impulse1;echo "weapon 1";set SelectSlowFire vstr SelectSlowFire2"
set SelectSlowFire2 "bind w _impulse2;echo "weapon 2";set SelectSlowFire vstr SelectSlowFire1"
set SelectSlowFire "vstr SelectSlowFire1"

bind MWHEELDOWN "vstr SelectSlowFire"
bind MWHEELUP "vstr SelectExplosive"
bind MOUSE3 "vstr SelectRapidFire"
R00k
Posts: 15188
Joined: Mon Dec 18, 2000 8:00 am

Post by R00k »

edit: Didn't notice. I wasn't aware D3 restricted the underscore commands too. I never tried to write any scripts for Doom. :)
Last edited by R00k on Fri Oct 21, 2005 4:27 am, edited 1 time in total.
Zyte
Posts: 888
Joined: Tue Aug 26, 2003 7:00 am

Post by Zyte »

i want mouseaccel and simpleitems :E
kawaii
Posts: 3
Joined: Fri Oct 21, 2005 12:34 pm

Post by kawaii »

I've read the above posts, but I still don't know how to bind a crosshair, fov and sensitivity to a weapon. In quake 3 it was very easy.. but in quake 4 it's pretty difficult.
q4aholic
Posts: 148
Joined: Thu Oct 20, 2005 6:29 pm

Post by q4aholic »

Locked