One thing that I've noticed when making cfgs that involve voice lines is that the "voicemenu" command is slightly screwed up.
The TF2 wiki says that voicemenu 1 1 corresponds to the "Medic" voiceline. In-game, this is technically true; when you open the first voice menu 1 (z by default) then 1, your class will call for a medic. However, when scripting, voicemenu 1 1 corresponds to the "Spy!" voiceline.
Essentially, for writing voice commands in your cfgs you have to simply subtract 1 from each number you would ordinarily put for the voice commands.
For example, the "Dispenser Here" command in-game is voice menu 2 (bound to x by default) and 5.
But when scripting you need to type it as "voicemenu 1 4."
For convenience, I've organized all of the menu commands with their respective voice lines.
- voicemenu 0 0 - Medic
- voicemenu 0 1 - Thanks
- voicemenu 0 2 - Go Go Go
- voicemenu 0 3 - Move gear up
- voicemenu 0 4 - Go Left
- voicemenu 0 5 - Go Right
- voicemenu 0 6 - Yes
- voicemenu 0 7 - No
- voicemenu 0 8 - Pass to me (who uses this???)
- voicemenu 1 0 - Incomming
- voicemenu 1 1 - Spy (Will designate class when crosshair is pointed at player)
- voicemenu 1 2 - There's a Sentry Ahead
- voicemenu 1 3 - Put a Teleporter Here
- voicemenu 1 4 - Put a Dispenser Here! (most important command in the game)
- voicemenu 1 5 - Put a Sentry here
- voicemenu 1 6 - Activate Übercharge
- voicemenu 1 7 - Übercharge Ready (Can only be used by medics or spies disguised as medics
- voicemenu 1 8 - Pass to me
- voicemenu 2 0 - Call for Help
- voicemenu 2 1 - Battlecry
- voicemenu 2 2 - Cheers
- voicemenu 2 3 - Shit-talking
- voicemenu 2 4 - Positive
- voicemenu 2 5 - Negative
- voicemenu 2 6 - Nice Shot
- voicemenu 2 7 - Good job
If I missed anything feel free to correct me.
Edit: Formatting issues
One thing that I've noticed when making cfgs that involve voice lines is that the "voicemenu" command is slightly screwed up.
[url=https://wiki.teamfortress.com/wiki/Voice_commands] The TF2 wiki [/url] says that voicemenu 1 1 corresponds to the "Medic" voiceline. In-game, this is technically true; when you open the first voice menu 1 (z by default) then 1, your class will call for a medic. [i]However,[/i] when scripting, voicemenu 1 1 corresponds to the "Spy!" voiceline.
Essentially, for writing voice commands in your cfgs you have to simply subtract 1 from each number you would ordinarily put for the voice commands.
For example, the "Dispenser Here" command in-game is voice menu 2 (bound to x by default) and 5.
But when scripting you need to type it as "voicemenu 1 4."
For convenience, I've organized all of the menu commands with their respective voice lines.
[list]
[*] voicemenu 0 0 - Medic
[*] voicemenu 0 1 - Thanks
[*] voicemenu 0 2 - Go Go Go
[*] voicemenu 0 3 - Move gear up
[*] voicemenu 0 4 - Go Left
[*] voicemenu 0 5 - Go Right
[*] voicemenu 0 6 - Yes
[*] voicemenu 0 7 - No
[*] voicemenu 0 8 - Pass to me (who uses this???)
[*] voicemenu 1 0 - Incomming
[*] voicemenu 1 1 - Spy (Will designate class when crosshair is pointed at player)
[*] voicemenu 1 2 - There's a Sentry Ahead
[*] voicemenu 1 3 - Put a Teleporter Here
[*] voicemenu 1 4 - Put a Dispenser Here! (most important command in the game)
[*] voicemenu 1 5 - Put a Sentry here
[*] voicemenu 1 6 - Activate Übercharge
[*] voicemenu 1 7 - Übercharge Ready (Can only be used by medics or spies disguised as medics
[*] voicemenu 1 8 - Pass to me
[*] voicemenu 2 0 - Call for Help
[*] voicemenu 2 1 - Battlecry
[*] voicemenu 2 2 - Cheers
[*] voicemenu 2 3 - Shit-talking
[*] voicemenu 2 4 - Positive
[*] voicemenu 2 5 - Negative
[*] voicemenu 2 6 - Nice Shot
[*] voicemenu 2 7 - Good job
[/list]
If I missed anything feel free to correct me.
Edit: Formatting issues
ok so add that to the wiki?
nvm its already there lol
"It is to be noted, that when trying to use voice commands in a script, that each of the menus has a different number that must be used. For example, voice menu 1 would be voice menu 0 when trying to script. More information can be found in the Wiki's Scripting page."
also its not "screwed up" who cares if it starts at 0 and not 1
[s]ok so add that to the wiki?[/s]
nvm its already there lol
"It is to be noted, that when trying to use voice commands in a script, that each of the menus has a different number that must be used. For example, voice menu 1 would be voice menu 0 when trying to script. More information can be found in the Wiki's Scripting page."
also its not "screwed up" who cares if it starts at 0 and not 1
Starting at 0 and not 1 is simply because that's how computers like to work, index 0 is a thing
Starting at 0 and not 1 is simply because that's how computers like to work, index 0 is a thing
BrimstoneStarting at 0 and not 1 is simply because that's how computers like to work, index 0 is a thing
TIL, thanks
[quote=Brimstone]Starting at 0 and not 1 is simply because that's how computers like to work, index 0 is a thing[/quote]
TIL, thanks