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
Level ambience
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#1
Level ambience

I can't find anything online about this and I was wondering if you guys could help me out with this. I just want one the their ambience sounds to play throughout the whole level right when I spawn into it. How do I make that work?

The ones at the front always die first...
06-05-2016, 06:11 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Level ambience

Use a looping PlaySoundAtEntity() on the Player in OnStart();

Or, place it somewhere in the map, call it OnStart(); and loop it, or make it play at selective times using a timer.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
06-05-2016, 07:59 AM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#3
RE: Level ambience

Would it just look like this then?

void OnStart()
{
AddEntityCollideCallback("Player", "AmbienceWind", "Level2", true, 1);
}


void Level2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("windsound", "ambience_wind_eerie.snt", "AmbienceWind", 0.01f, true);
}

The ones at the front always die first...
06-05-2016, 05:28 PM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#4
RE: Level ambience

Or use a sound object in the level editor, place it anywhere and select the ambiance sound you want to play.
Try the ones in /sounds/ambience

06-05-2016, 06:25 PM
Find
Xallikk Offline
Junior Member

Posts: 35
Threads: 7
Joined: Jun 2016
Reputation: 0
#5
RE: Level ambience

Great that works thx! I tried that before and it hadn't worked but now it does!

The ones at the front always die first...
06-05-2016, 07:35 PM
Find




Users browsing this thread: 1 Guest(s)