Page 1 of 1
TF2 Script Issue
Posted: Thu May 18, 2017 10:23 pm
by Bench
So I was modifying a script for TF2 that would essentially allow the keys on my number pad have two bound commands. In order for this to work, I have an action key bound to toggle between each command to use. The issue is how the activator key would print the message in console for when you use the incorrect layout when using the bind command upon being pressed. It would print nine times when pressed, being as how I have nine keys with the multiple commands, I presume. If anyone has a fix, please help.
Text Being Spammed in Console
Script
Re: TF2 Script Issue
Posted: Thu May 18, 2017 11:24 pm
by MoneyKidKing
From what I can tell, your issue is the location of your quotation marks. I would test the fixed code myself, but I don't want to mess with my own binds, so let me know if the following code works.
Re: TF2 Script Issue
Posted: Thu May 18, 2017 11:28 pm
by fishermatt3552
It seems your quotation marks are out of place
bind "key" "command"
Re: TF2 Script Issue
Posted: Fri May 19, 2017 1:17 am
by Bench
Didn't fix the problem with the action key and now the number pad keys will do the secondary command (taunt) without using the action key. Holding the action key and pressing the key has no effect.
EDIT: Quotes did not solve the problem.
My quote location was correct since I have <alias script "bind key say text"> instead of <alias script bind key "say text">. This is because the quote is separating the whole bind, key, and say from the alias. Having the quotes would be incorrect in how it would make be only say. Fuck this hurts my brain.
Re: TF2 Script Issue
Posted: Fri May 19, 2017 3:15 am
by MoneyKidKing
I mean, the other option is to just go overkill on the quotations.
Re: TF2 Script Issue
Posted: Fri May 19, 2017 11:59 am
by Mitch
Theres a small trick to doing binds, you will need to creat .cfg files that have each bind in it, and make the aliases exec the cfg instead. This is how I would do it in cs:s.
Re: TF2 Script Issue
Posted: Tue May 23, 2017 6:55 pm
by Bench
Issue has been resolved, thread no longer needed.