PDA

View Full Version : how do I make a gun script?


dwarfed centipede
08-04-2007, 10:04 PM
Iv tried a lot of stuff now. I want my mouse4 button to switch back and forth from _weapon1 and _weapon2. The "alias" command doesnt work and vstr doesnt work. Anyone know how I can get a .cfg file to actually exec something?

//autoexec.cfg file
bind mouse4 "exec nextweap.cfg"

//nextweap.cfg file
bind mouse4 _weapon1
vstr mouse4
bind mouse4 "exec nextweap2.cfg"

//nextweap2.cfg file
bind mouse4 "_weapon2"
vstr mouse4
bind mouse4 "exec nextweap.cfg"

If possible, anyone know how to put all these in my autoexec.cfg file? I keep getting error messages when I tried this:

set nextweap "bind mouse4 _weapon1; vstr mouse4; bind mouse4 $nextweap2"
set nextweap2 "bind mouse4 _weapon2; vstr mouse4; bind mouse4 $nextweap"
bind mouse4 $nextweap

dwarfed centipede
08-04-2007, 10:27 PM
I keep getting "unknown command _weapon1" or _weapon2 when I hit mouse4 no matter how I code it.

MoP
08-04-2007, 10:30 PM
You can't have commands starting with _ in a bind chain, which will be why your autoexec and "$nextweap" scripts don't work.

dwarfed centipede
08-05-2007, 12:10 AM
so how do I do get a key to do 1 thing and switch to another back and forth?

2phew
08-05-2007, 12:16 AM
http://4newbies.planetwolfenstein.gamespy.com/ETQW/scripting.php
have you looked at this site

dwarfed centipede
08-05-2007, 04:51 AM
yeah I have, I dont think its possible to do what I want. Im just ganna have to use both my thumb buttons instead of 1.

Ifurita
08-06-2007, 06:37 PM
Per MoPs post, you cannot create weapon scripts

h2o.
08-09-2007, 04:18 AM
I hope they dont let you use some of the scripts that gave people advantege in some other games..............that used simular engine

HalF.DeaD
08-09-2007, 06:22 AM
Yeah, but i need draw gun to be turned off when i choose pistol or main weapon ;)