Binds, Commands, Cvars & Scripts
-
- Posts: 506
- Joined: Fri Nov 29, 2002 8:00 am
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
_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
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
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? =\
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? =\
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...

I thought maybe this would work:
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...
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"
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...
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"
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"