Advanced \bind Command Needed


(jerryli500) #1

hey guys,

i have been asking this same question around the net and seem to find no good answer, so i came back to where it all began- to teh creators of ET! please help me out here. thanks

i want to bind this sequence: for example with one button i want to switch to slot 6 fire once and switch back to previous weapon with all one bound button command. Is this even possible in the QIII engine.

this is very example if ur a 4star medic aplying self adrenaline in battle. ot droping nades after kills to gib and set medic bobby trap.

Again thanks for your help,
j


(kamikazee) #2

Strange that you didn’t get an answer at http://enemy-territory.4players.de ; I know that at least one scripter reads those forums.


(Jaquboss) #3

i would use +vstr command from OSP, which allows you to simulate button


(ouroboro) #4
bind 1 "weaponbank 1; set prevwep weaponbank 1"
bind 2 "weaponbank 2; set prevwep weaponbank 2"
bind 3 "weaponbank 3; set prevwep weaponbank 3"
bind 4 "weaponbank 4; set prevwep weaponbank 4"
bind 5 "weaponbank 5; set prevwep weaponbank 5"
bind 6 "weaponbank 6; set prevwep weaponbank 6"
bind 7 "weaponbank 7; set prevwep weaponbank 7"
bind 8 "weaponbank 8; set prevwep weaponbank 8"
bind 9 "weaponbank 9; set prevwep weaponbank 9"
bind 0 "weaponbank 10; set prevwep weaponbank 10"

bind x "weaponbank 6; wait 76; +attack; wait 76; -attack; vstr prevwep"

I typed this out right here and haven’t tested it, but it should work. Set the wait times to match your com_maxfps value.

Note that you can’t execute other commands during a wait. So for example you won’t be able to change movement direction for 2 seconds after pressing the bind. Lowering wait times may help but if they’re too low the script won’t work. FYI, “wait <com_maxfps value>” = wait one second, half com_maxfps = 1/2 second, etc.


(jerryli500) #5

thanks man!

that works with some adjustement here:

bind “f” “weaponbank 6; wait 10; +attack; wait 60; -attack; weaponbank 3”

peace thanks again!


(ouroboro) #6

yw

You said you wanted it to go back to your previous weapon, hence all the prevwep stuff. That way, if you had pistol out, it’d go back to pistol. If all you need is for it to go back to weaponbank 3, you can remove the “; set prevwep weaponbank x” stuff from the binds.