Upvote Upvoted 2 Downvote Downvoted
Scripting Help?
posted in Q/A Help
1
#1
1 Frags +

I'd love to know if there's a way to make certain sound files play for actions that you perform in game, like popping uber/getting a frag. Sorta like a hitsound except for something that isn't a hit.

I'm hoping that there is a way to do this, but I haven't seen it done before so that made me wonder if it isn't nearly as simple as I'd expect it to be. If there is a way to do this, could someone let me know how?
Thanks.

p.s. I attempted trying to make something work that was set up in a way similar to how the hitsound works, but to no avail.

p.s.s. I'm relatively completely new to scripting in TF2.

I'd love to know if there's a way to make certain sound files play for actions that you perform in game, like popping uber/getting a frag. Sorta like a hitsound except for something that isn't a hit.

I'm hoping that there is a way to do this, but I haven't seen it done before so that made me wonder if it isn't nearly as simple as I'd expect it to be. If there is a way to do this, could someone let me know how?
Thanks.

p.s. I attempted trying to make something work that was set up in a way similar to how the hitsound works, but to no avail.

p.s.s. I'm [s]relatively[/s] completely new to scripting in TF2.
2
#2
1 Frags +

You could probably use a custom übercharge sound, but it wouldn't work in sv_pure, so you'd only have it in pubs. I don't know about when getting a frag though.

You could probably use a custom übercharge sound, but it wouldn't work in sv_pure, so you'd only have it in pubs. I don't know about when getting a frag though.
3
#3
3 Frags +

I have no idea how you would do it for getting a frag, but for popping an uber its pretty straight forward,

bind "mouse2" "+attack2;play mysound.wav"

where mysound.wav is a sound file located in your tf/sound folder.

Put this in all your other class configs so it doesn't happen when you're revving your minigun or detonating stickies or otherwise using the mouse2 button for other classes:

bind "mouse2" "+attack2"

EDIT: forgot to add the quote marks at the end of the first code I wrote.

I have no idea how you would do it for getting a frag, but for popping an uber its pretty straight forward,

[code]bind "mouse2" "+attack2;play mysound.wav"[/code]

where mysound.wav is a sound file located in your tf/sound folder.

Put this in all your other class configs so it doesn't happen when you're revving your minigun or detonating stickies or otherwise using the mouse2 button for other classes:

[code]bind "mouse2" "+attack2"[/code]

EDIT: forgot to add the quote marks at the end of the first code I wrote.
4
#4
0 Frags +

Thanks, I really appreciate the help.

Thanks, I really appreciate the help.
5
#5
1 Frags +

Using Rigel's method you could certainly have a sound for keys that you press but as far as replacing sounds of things currently in the game the answer is yes and no.

You can replace many of the sounds of things in game (re: Salamancer's Sound Pack) but if you're playing on a sv_pure 1 or 2 server then you won't be able to. All comp settings use sv_pure 2 so you're out of luck if you want to use it in scrims or matches. Most public severs have sv_pure 0 so it could work there and also if you're looking at STVs or demos. Hope this helped clarify things!

Using Rigel's method you could certainly have a sound for keys that you press but as far as replacing sounds of things currently in the game the answer is yes and no.

You can replace many of the sounds of things in game (re: Salamancer's Sound Pack) but if you're playing on a sv_pure 1 or 2 server then you won't be able to. All comp settings use sv_pure 2 so you're out of luck if you want to use it in scrims or matches. Most public severs have sv_pure 0 so it could work there and also if you're looking at STVs or demos. Hope this helped clarify things!
Please sign in through STEAM to post a comment.