Raised This Month: $ Target: $400
 0% 

Help making a sound stop looping.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mokasin
New Member
Join Date: Sep 2009
Old 09-04-2009 , 00:30   Help making a sound stop looping.
Reply With Quote #1

I've made some changes to my blockmakers heal block, so it plays a sound when walked on.
How can i prevent the sound from looping while standing on it?

So far my code looks like this:
PHP Code:
actionHeal(id)
{
    if (
halflife_time() >= gfNextHealTime[id])
    {
        new 
hp get_user_health(id);
        new 
amount floatround(get_cvar_float("bm_healamount"), 

floatround_floor);
        new 
sum = (hp amount);
        
        if (
sum 100)
        {
            
set_user_health(idsum);
        }
        else
        {
            
set_user_health(id100);
        }
        
        
gfNextHealTime[id] = halflife_time() + 0.5;
        
        
//play heal sound
        
emit_sound(idCHAN_STATICgszHealSound1.0ATTN_NORM0

PITCH_NORM);
    }

I'm sorry, didn't realize that i put 60.0 in there. It should be 0.5.
__________________
Game Recognizes Game

Last edited by Mokasin; 09-04-2009 at 02:39.
Mokasin is offline
 



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 15:10.


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