Bind/alias Help
devicenull
Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
in Tech Support
Okay..I have this:
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
//Many of the binds are in these, don't remove these lines
exec commbuildbinds.cfg
exec alienbinds.cfg
//Misc. Stuff
unbind kp_minus
bind kp_minus "gorgemode"
alias devon "developer 1"
alias devoff "developer 0"
devon
echo "Gorge/Comm Script v1.00 Active"
echo "Press - on the numpad to toggle"
devoff
//Unbind all numpad keys
alias unbindnumpad "unbind kp_end; unbind kp_downarrow; unbind kp_pgdn; unbind kp_leftarrow; unbind kp_5; unbind kp_rightarrow; unbind kp_home; unbind kp_uparrow; unbind kp_pgup; unbind kp_plus"
//Change to gorge binds
alias gorgemode devon; echo "Gorge Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "commmode"; gorgebind
//Change to comm binds
alias commmode devon; echo "Comm Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "gorgemode"; commbind
// |------------------|
// |Num--X---X---gorge|
// |Tur---JP---HA--HMG|
// |Med----Amm----Weld|
// |Res----PG-----Scan|
// |------------------|
// Comm Mode
alias commbind bind kp_end "build; rt"; bind kp_downarrow "advbuild; pg"; bind kp_pgdn "build; scan"; bind kp_leftarrow "equip; med"; bind kp_5 "menu; ammo"; bind kp_rightarrow "equip; welder"; bind kp_home "build; turret" bind kp_uparrow "equip; jp"; bind kp_pgup "equip; ha" bind kp_plus "equip; hmg"
// |------------------|
// |Num---X---X---Comm|
// |X-------X--------X|
// |MC-----Hive-----SC|
// |Res-----OT------DC|
// |------------------|
// Gorge Mode
alias gorgebind bind kp_end "art"; bind kp_downarrow "oc"; bind kp_pgdn "dc"; bind kp_leftarrow "mc"; bind kp_5 "hive; say_team "Hive Going Up""; bind kp_rightarrow "sc"
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
and It does exec, (in config.cfg) I think.. but I have only gotten the message once, and it displayed half the line with it,
And only half work, rt, oc, dc
I attached the other two files, its basically aliasing everything to make it easier...
Any help?
Note: Feel free to take the attached files and use them however you want, I don't care if you credit me or not
<!--c1--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
//Many of the binds are in these, don't remove these lines
exec commbuildbinds.cfg
exec alienbinds.cfg
//Misc. Stuff
unbind kp_minus
bind kp_minus "gorgemode"
alias devon "developer 1"
alias devoff "developer 0"
devon
echo "Gorge/Comm Script v1.00 Active"
echo "Press - on the numpad to toggle"
devoff
//Unbind all numpad keys
alias unbindnumpad "unbind kp_end; unbind kp_downarrow; unbind kp_pgdn; unbind kp_leftarrow; unbind kp_5; unbind kp_rightarrow; unbind kp_home; unbind kp_uparrow; unbind kp_pgup; unbind kp_plus"
//Change to gorge binds
alias gorgemode devon; echo "Gorge Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "commmode"; gorgebind
//Change to comm binds
alias commmode devon; echo "Comm Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "gorgemode"; commbind
// |------------------|
// |Num--X---X---gorge|
// |Tur---JP---HA--HMG|
// |Med----Amm----Weld|
// |Res----PG-----Scan|
// |------------------|
// Comm Mode
alias commbind bind kp_end "build; rt"; bind kp_downarrow "advbuild; pg"; bind kp_pgdn "build; scan"; bind kp_leftarrow "equip; med"; bind kp_5 "menu; ammo"; bind kp_rightarrow "equip; welder"; bind kp_home "build; turret" bind kp_uparrow "equip; jp"; bind kp_pgup "equip; ha" bind kp_plus "equip; hmg"
// |------------------|
// |Num---X---X---Comm|
// |X-------X--------X|
// |MC-----Hive-----SC|
// |Res-----OT------DC|
// |------------------|
// Gorge Mode
alias gorgebind bind kp_end "art"; bind kp_downarrow "oc"; bind kp_pgdn "dc"; bind kp_leftarrow "mc"; bind kp_5 "hive; say_team "Hive Going Up""; bind kp_rightarrow "sc"
<!--c2--></td></tr></table><span class='postcolor'><!--ec2-->
and It does exec, (in config.cfg) I think.. but I have only gotten the message once, and it displayed half the line with it,
And only half work, rt, oc, dc
I attached the other two files, its basically aliasing everything to make it easier...
Any help?
Note: Feel free to take the attached files and use them however you want, I don't care if you credit me or not
Comments
ok, I really am to tired to go through your code right now (I might do it latter) but here are some hints on debugging <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
1) Throw in more echos, honestly just pop em in for every action you wana test, if the echo goes off or dosn't you can then start working foward/backwards to find the break
2) You can not alias/bind multiple hotkeys (I have a feeling you tried to do this). This was to prevent skript kiddieing, I think Flay is changing this in 1.1 (don't quote me on that)
3) try running only part of it
for instance add to your auto exec
exec "inster cfg that does all your gorge stuff here" and see just what works and why
in each of those CFGs put an echo (commbuilds loaded etc)
and goodluck
oh and some one has done all of this if you wan a more wokring version (if you are simply doing this for your own satisfaciton I can understand)
[EDIT]
bind kp_end "build; rt" will not work due to execing multiple hotkeys (even if aliased) sorry mate
the general way of doing this is to synch up the keypad to the comms current view of his menues
yah, its a **** (thats gona be edited) to do. sorry mate
If you want to use multiple commands in an alias they have to be within ""s.
your alias:
alias gorgemode devon; echo "Gorge Mode Active"; devoff; unbindnumpad; unbind kp_minus; bind kp_minus "commmode"; gorgebind
correct one:
alias gorgemode "devon; echo Gorge Mode Active; devoff; unbindnumpad; unbind kp_minus; bind kp_minus commmode; gorgebind"
Commbind and Gorgebind are a bit tricky. My suggestion would be to split them up into more aliases.
alias marine_kp1 "build, rt"
alias marine_kp2 "advbuild; pg"
...
alias commbind "bind kp_end marine_kp1; bind kp_downarrow marine_kp2; ..."
Hope this helps.
Keep in mind this is just common HL scripting knowledge, I didn't use any scripts in NS so far, not sure if the mod specific commands will work.
so what he aid as well as hotkeys not being able to be multi bound
So for the comm menus, I would have to have other keys to switch to the right menu, then another one to exec the command...well thats a pain. I don't mind too much, because I usually play as alien
I really hope I can have multiple hotkeys on one key in 1.1 <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html/emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif'><!--endemo-->
<a href='http://half-life.gamehelp.com/' target='_blank'>http://half-life.gamehelp.com/</a> <--that site is a pain, whenever I mouseover a link or picture, the entire screen turns yellow...not fun.. It's probably Mozilla, but I am unwilling to go to any other browser, so I guess I'll have to use IE to view it...