Raised This Month: $51 Target: $400
 12% 

Disable Announcer Voice


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vincenator
Member
Join Date: Aug 2009
Old 08-03-2011 , 18:36   Disable Announcer Voice
Reply With Quote #1

I'm trying to silence the announcer's countdown in arena mode, the "5, 4, 3, 2, 1, Control Point enabled!"

Is there a way to preemptively silence the announcer?

So far, I've been able to quickly - but not instantly - stop the 5-4-3-2-1 announcements like this:
On arena round start, CreateTimer(55.0,StopCountdownSound,5), which calls StopSound(allclients, SNDCHAN_VOICE, "vo/announcer_begins_5sec.wav").

This always stops the sounds, but sometimes they start playing for a noticeable amount of time (maybe .1 of a second).

I haven't been able stop the "Control Point enabled" announcement at all though. StopSound(allclients, SNDCHAN_VOICE, "vo/announcer_am_capenabled01.wav") with 01 through 04 doesn't do anything, and I tried all the sound channels I could find. Also, teamplay_broadcast_audio doesn't fire on any of these lines.


Thanks!

Also, any ideas on hiding the 5-4-3-2-1 text over the control point HUD icon?

Last edited by Vincenator; 08-03-2011 at 18:43.
Vincenator is offline
Jindo
AlliedModders Donor
Join Date: May 2009
Location: England, UK
Old 08-04-2011 , 08:06   Re: Disable Announcer Voice
Reply With Quote #2

I think something like this would work:

PHP Code:
public Action:AmbientSoundHook(String:sample[PLATFORM_MAX_PATH], &entity, &Float:volume, &level, &pitchFloat:pos[3], &flags, &Float:delay)
{
    if (
StrContains(sample"vo\announcer_"true) != -1)
    {
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

It's probably not the nicest way as there is a risk of exceptions but that should cover all and only announcer voice clips.

Not entirely sure about the HUD countdown.
__________________
Jindo is offline
Reply



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 14:39.


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