Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom Sound & Music Help Needed
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#1
Custom Sound & Music Help Needed

Hey there all, I'm trying to put some custom sounds, and music into my story, but some sounds work just fine, while other just plain right refuse to appear. There's no error message, they just don't play.

For example, I'm trying to play a sound called arisiren. I've tried working it as both a sound, and as music, but neither work.

Here's my code, you can see multiple attempts at making the sound work in there:

////////////////////////////
// Run first time starting map
void OnStart()
{  

    PlaySoundAtEntity("", "airsiren.snt", "Player", 0, false);
    SetPlayerActive(false);
    SetPlayerCrouching(true);
    
    FadeOut(0);
    FadeIn(3);
    AddTimer("T1", 1, "Intro");
    AddTimer("T2", 3, "Intro");
    AddTimer("T3", 5, "Intro");
    AddTimer("T4", 7, "Intro");
    AddTimer("T5", 7.8, "Intro");
}
////////////////////////////
// Run when entering map
void OnEnter()
{
PlayMusic("airsiren.ogg", true, 100, 5, 0, true);
}
    void Intro(string &in asTimer)
    {
    string x = asTimer;
    if (x == "T1")
    {
        PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
        FadeOut(3);
    }
    else if (x == "T2")
    {
        FadeIn(3);
        PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
        PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
        StartPlayerLookAt("ScriptArea_1", 2, 2, "");
    }
    else if (x == "T3")
    {
        StopPlayerLookAt();
        StartPlayerLookAt("ScriptArea_2", 2, 2, "");
    }
    else if (x == "T4")
    {
        AddPlayerBodyForce(0, 0, 22300, false);
        StartPlayerLookAt("ScriptArea_3", 2, 2, "");
    }
    else if (x == "T5")
    {
        FadeOut(0.001);
        PlaySoundAtEntity("", "player_falldamage_max.snt", "Player", 0, false);
       
        StopMusic(2, 0);
    }
}


////////////////////////////
// Run when leaving map
void OnLeave()
{
}

My code seems fairly identical for the sounds that work, and ones that don't. Is it something with the sound files themselves, or something else?

Also, here's the tutorial I used: http://wiki.frictionalgames.com/hpl2/tut...cript/page
(This post was last modified: 04-01-2012, 09:08 AM by Kreekakon.)
04-01-2012, 09:07 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#2
RE: Custom Sound & Music Help Needed

Show the code inside the .snt file please.

04-01-2012, 09:12 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#3
RE: Custom Sound & Music Help Needed

(04-01-2012, 09:12 AM)flamez3 Wrote: Show the code inside the .snt file please.
Done:
<SOUNDENTITY>
<SOUNDS>
   <Main>
      <Sound File="airsiren.ogg" />
       </Main>
   </SOUNDS>
   <PROPERTIES Volume="5" MinDistance="1" MaxDistance="50" Random="0" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="false" Blockable="False" BlockVolumeMul="0.7" Priority="5" />
</SOUNDENTITY>

04-01-2012, 09:18 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Custom Sound & Music Help Needed

Try this:


<SOUNDENTITY>
<SOUNDS>
<Main>
<Sound File="airsiren.ogg" />
</Main>
</SOUNDS>
<PROPERTIES Volume="1" MinDistance="4" MaxDistance="40" Random="1" Interval="0" FadeEnd="False" FadeStart="False" Stream="False" Loop="False" Use3D="True" Blockable="False" BlockVolumeMul="0.5" Priority="0" />
</SOUNDENTITY>

And where are you putting these files?

04-01-2012, 09:25 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#5
RE: Custom Sound & Music Help Needed

No, that code didn't work.

Well currently I'm stuffing them everywhere. For sound I have the .ogg, and .snt in two places:
/sound/extrasound
/sound

And for music, I have the .ogg in two places as well:
/music
/music/extramusic
04-01-2012, 09:32 AM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#6
RE: Custom Sound & Music Help Needed

Go:

Your Custom Story Name
|_ maps
|_sounds <---- put all .snt and .ogg's in there.

04-01-2012, 10:15 AM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#7
RE: Custom Sound & Music Help Needed

Tried placing them there. Still didn't work unfortunately.
04-01-2012, 05:02 PM
Find
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#8
RE: Custom Sound & Music Help Needed

What did you use to convert the .ogg files?

04-01-2012, 05:06 PM
Find
Kreekakon Offline
Pick a god and pray!

Posts: 3,063
Threads: 70
Joined: Mar 2012
Reputation: 124
#9
RE: Custom Sound & Music Help Needed

Goldwave; used it for several other custom sounds too. Some work, some don't.
(This post was last modified: 04-01-2012, 05:13 PM by Kreekakon.)
04-01-2012, 05:13 PM
Find
Xanthos Offline
Senior Member

Posts: 318
Threads: 9
Joined: Mar 2012
Reputation: 8
#10
RE: Custom Sound & Music Help Needed

I don't know what that is, so I probably won't be able to help.

But here's what I use.
I used FreeAudioConverter v5.2

Then I got sonyvegaspro 11
So i deleted the Audio Converter
Wait I got an idea.
Upload the sound file for .mp3 or .wma then I'll convert it then reupload it

(This post was last modified: 04-01-2012, 05:15 PM by Xanthos.)
04-01-2012, 05:15 PM
Find




Users browsing this thread: 2 Guest(s)