Xallikk
Junior Member
Posts: 35
Threads: 7
Joined: Jun 2016
Reputation:
0
|
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 |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
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
|
|
06-05-2016, 07:59 AM |
|
Xallikk
Junior Member
Posts: 35
Threads: 7
Joined: Jun 2016
Reputation:
0
|
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 |
|
Daemian
Posting Freak
Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation:
49
|
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 |
|
Xallikk
Junior Member
Posts: 35
Threads: 7
Joined: Jun 2016
Reputation:
0
|
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 |
|