Upvote Upvoted 0 Downvote Downvoted
Binding keys to do multiple things [SCRIPT HELP]
posted in Q/A Help
1
#1
0 Frags +

http://imgur.com/pHJx1Vu.jpg

http://imgur.com/nI9MndI.jpg

Basically, I want to make it so that my view models don't appear for my primary and secondary, but my view model does appear for my melee. I also have the script that makes it so that my primary + secondary have a different crosshair to my melee. These scripts are all bounded to 1,2 and 3 and these scripts work by themselves but if I merge them together my crosshair stops changing when I press 1,2 and 3 and only perform the r_drawviewmodel function.
Basically, I need help finding a way to make sure my numbers perform both the scripts.

[img]http://imgur.com/pHJx1Vu.jpg[/img]


[img]http://imgur.com/nI9MndI.jpg[/img]

Basically, I want to make it so that my view models don't appear for my primary and secondary, but my view model does appear for my melee. I also have the script that makes it so that my primary + secondary have a different crosshair to my melee. These scripts are all bounded to 1,2 and 3 and these scripts work by themselves but if I merge them together my crosshair stops changing when I press 1,2 and 3 and only perform the r_drawviewmodel function.
Basically, I need help finding a way to make sure my numbers perform both the scripts.
2
#2
3 Frags +

If you're making something that has more than one command, you need to put it within an alias and bind that alias to a key

Alias primary "slot1; r_drawviewmodel 0"
Alias secondary "slot2; r_drawviewmodel 0"
Alias melee "slot3; r_drawviewmodel 1"

Bind "1" "primary"
Bind "2" "secondary"
Bind "3" "melee"

If you also want different crosshairs (meaning the in game tf2 ones), you're also going to have to put cl_crosshair_file and the crosshair name (crosshair3 is the circle, etc)

If you're making something that has more than one command, you need to put it within an alias and bind that alias to a key
[code]
Alias primary "slot1; r_drawviewmodel 0"
Alias secondary "slot2; r_drawviewmodel 0"
Alias melee "slot3; r_drawviewmodel 1"

Bind "1" "primary"
Bind "2" "secondary"
Bind "3" "melee"[/code]

If you also want different crosshairs (meaning the in game tf2 ones), you're also going to have to put cl_crosshair_file and the crosshair name (crosshair3 is the circle, etc)
3
#3
1 Frags +

In your Aron's crosshair switcher file, just change the r_drawviewmodels in nadelauncher, stickylauncher, and bottle to what you want them to be.

So in nadelauncher and stickylauncher, change "r_drawviewmodel 1" to "r_drawviewmodel 0"

In your Aron's crosshair switcher file, just change the r_drawviewmodels in nadelauncher, stickylauncher, and bottle to what you want them to be.

So in nadelauncher and stickylauncher, change "r_drawviewmodel 1" to "r_drawviewmodel 0"
4
#4
1 Frags +
razzmatazzhttp://imgur.com/pHJx1Vu.jpg

http://imgur.com/nI9MndI.jpg

Basically, I want to make it so that my view models don't appear for my primary and secondary, but my view model does appear for my melee. I also have the script that makes it so that my primary + secondary have a different crosshair to my melee. These scripts are all bounded to 1,2 and 3 and these scripts work by themselves but if I merge them together my crosshair stops changing when I press 1,2 and 3 and only perform the r_drawviewmodel function.
Basically, I need help finding a way to make sure my numbers perform both the scripts.

Are you using your mouse wheel and Q for switching weapons?

KonceptIf you're making something that has more than one command, you need to put it within an alias and bind that alias to a key
Alias primary "slot1; r_drawviewmodel 0"
Alias secondary "slot2; r_drawviewmodel 0"
Alias melee "slot3; r_drawviewmodel 1"

Bind "1" "primary"
Bind "2" "secondary"
Bind "3" "melee"

If you also want different crosshairs (meaning the in game tf2 ones), you're also going to have to put cl_crosshair_file and the crosshair name (crosshair3 is the circle, etc)

You don't need an alias to bind multiple things to one key

Bind "1" "slot1;  r_drawviewmodel 0; cl_crosshair_file crosshair3"
Bind "2" "slot2;  r_drawviewmodel 0; cl_crosshair_file crosshair3"
Bind "3" "slot3;  r_drawviewmodel 1; cl_crosshair_file crosshair5"

Just delete the crosshair switchers in your clsss configs, and replace it with the code above, you can edit it whenever you want, and I removed a lot of the unneeded code

[quote=razzmatazz][img]http://imgur.com/pHJx1Vu.jpg[/img]


[img]http://imgur.com/nI9MndI.jpg[/img]

Basically, I want to make it so that my view models don't appear for my primary and secondary, but my view model does appear for my melee. I also have the script that makes it so that my primary + secondary have a different crosshair to my melee. These scripts are all bounded to 1,2 and 3 and these scripts work by themselves but if I merge them together my crosshair stops changing when I press 1,2 and 3 and only perform the r_drawviewmodel function.
Basically, I need help finding a way to make sure my numbers perform both the scripts.[/quote]
Are you using your mouse wheel and Q for switching weapons?[quote=Koncept]If you're making something that has more than one command, you need to put it within an alias and bind that alias to a key
[code]
Alias primary "slot1; r_drawviewmodel 0"
Alias secondary "slot2; r_drawviewmodel 0"
Alias melee "slot3; r_drawviewmodel 1"

Bind "1" "primary"
Bind "2" "secondary"
Bind "3" "melee"[/code]

If you also want different crosshairs (meaning the in game tf2 ones), you're also going to have to put cl_crosshair_file and the crosshair name (crosshair3 is the circle, etc)[/quote]

You don't need an alias to bind multiple things to one key
[code]
Bind "1" "slot1; r_drawviewmodel 0; cl_crosshair_file crosshair3"
Bind "2" "slot2; r_drawviewmodel 0; cl_crosshair_file crosshair3"
Bind "3" "slot3; r_drawviewmodel 1; cl_crosshair_file crosshair5"[/code]

Just delete the crosshair switchers in your clsss configs, and replace it with the code above, you can edit it whenever you want, and I removed a lot of the unneeded code
5
#5
0 Frags +
VulcanYou don't need an alias to bind multiple things to one key

In my experience it doesn't work. Only the first command that's there can end up being registered by the game. It is entirely possible though that it's not that way in actuality but I'm speaking from my own experience in doing class cfgs

[quote=Vulcan]
You don't need an alias to bind multiple things to one key[/quote]

In my experience it doesn't work. Only the first command that's there can end up being registered by the game. It is entirely possible though that it's not that way in actuality but I'm speaking from my own experience in doing class cfgs
6
#6
0 Frags +
KonceptVulcanYou don't need an alias to bind multiple things to one key
In my experience it doesn't work. Only the first command that's there can end up being registered by the game. It is entirely possible though that it's not that way in actuality but I'm speaking from my own experience in doing class cfgs

You screwed something up but remember you cant have quotes inside quotes try:

bind w "+forward; +left"

but if you wanted to spam binds and move forward you would need aliases so

bind w "+forward; big_dick_bind_lol"
alias big_dick_bind_lol "say i have a big dick lol"
[quote=Koncept][quote=Vulcan]
You don't need an alias to bind multiple things to one key[/quote]

In my experience it doesn't work. Only the first command that's there can end up being registered by the game. It is entirely possible though that it's not that way in actuality but I'm speaking from my own experience in doing class cfgs[/quote]

You screwed something up but remember you cant have quotes inside quotes try:

[code]bind w "+forward; +left"[/code]

but if you wanted to spam binds and move forward you would need aliases so

[code]bind w "+forward; big_dick_bind_lol"
alias big_dick_bind_lol "say i have a big dick lol"[/code]
Please sign in through STEAM to post a comment.