Hi,
So I'm trying to give a weapon a charge up sound like the gauss gun on the 
jeep, and so I pretty much just copied and pasted the relevant bits of code to 
play the sound.  However, the sound will only play when the player starts 
shooting while they aren't touching the ground.  If the player is touching the 
ground, the sound doesn't play.  Well, actually, it claims the sound is 
playing, but I never hear it.

CPASAttenuationFilter filter( this );
m_sndCannonCharge = (CSoundEnvelopeController::GetController()).SoundCreate( 
filter, entindex(), CHAN_STATIC, "Tau.GaussCharge", ATTN_NORM );

assert(m_sndCannonCharge!=NULL);
if ( m_sndCannonCharge != NULL )
{
    DevMsg( "Playing sound\n" );
    (CSoundEnvelopeController::GetController()).Play( m_sndCannonCharge, 1.0f, 
50 );
    (CSoundEnvelopeController::GetController()).SoundChangePitch( 
m_sndCannonCharge, 250, 3.0f );
}

The relevant soundscript entry:
"Tau.GaussCharge"
{
    "channel"        "CHAN_STATIC"
    "volume"        "VOL_NORM"
    "soundlevel"    "SNDLVL_NORM"
    "wave"        ")weapons/gauss/chargeloop.wav"
}

I've tried using a couple different channels for the sound, but with no luck.  
Any ideas what I might be doing wrong?

Garrett



      
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to