Raised This Month: $32 Target: $400
 8% 

[TF2] VO Precaching


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blinx
Senior Member
Join Date: Oct 2013
Old 08-10-2019 , 12:18   [TF2] VO Precaching
Reply With Quote #1

I'm trying to create a mod for TF2 that switches your class' VO with a different class' (I.e., a Heavy will call out for medic using the scout's audio), and it was all going well until the game was claiming that the switched VO wasn't precached, so to test if I could do it myself I added

Code:
PrecacheSound("vo/engineer_medic01.mp3", true);
PrecacheSound("vo/engineer_medic02.mp3", true);
PrecacheSound("vo/engineer_medic03.mp3", true);
but the sound still won't play, and is outputting:

Code:
SV_StartSound: sound/vo/engineer_medic02.mp3 not precached (0)
to the console. I'm using FileExists to check that the target audio does exist, and if not it won't try to play it, so I'd only get this error if the game found the file, but isn't precached.

What else am I missing with this?

Here's the main block of code if it helps:

Spoiler
Blinx is offline
Blinx
Senior Member
Join Date: Oct 2013
Old 08-10-2019 , 16:41   Re: [TF2] VO Precaching
Reply With Quote #2

Nvm I figured it out, I needed to add "sound/" to the file path for the FileExists check, but I wasn't removing it for the path to the sound in EmitSound so it was looking for "sound/sound/vo/...".
Blinx is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode