Jump to content
Sign in to follow this  
mrbean1112

Question about how to play a sound

Recommended Posts

i am making a health counting script for the gordon freeman for tau hammerhead, i have a question, when the dammage gets down to .9 i want a sound to play that sounds like a powerdown of the suit, i have the sound, but how do i play it in the script?

Share this post


Link to post
Share on other sites

Add a trigger like this:

Axis a = 0

Axis b = 0

Activation = GameLogic

Once/Repeatly (whatever is needed)

Condition: damage unitname >= 0.9

On Activation: unitname say "SoundName"

description.ext:<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgSounds{

Sounds[]={};

class SoundName{name="SoundName";sound[]={"SoundName.ogg",db+8,1};titles[]={};};

};

Add a folder named "sound" to your mission-folder and copy the soundfile in it.

smile_o.gif

Share this post


Link to post
Share on other sites

Yeah but the sound is part of a unit. I want the unit to play a sound all the time, not just on the level.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×