Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

SetAmbientSound input?

Here you can find answered ScriptAPI topics.
Forum rules
By using the forum you agree to the following rules.
Post Reply
android7
Fighter
Fighter
Posts: 21
Joined: Sat Aug 27, 2016 11:54 am

SetAmbientSound input?

Post by android7 » Sat Nov 25, 2017 11:41 am

What do I put in.SetAmbientSound()?

Im just trying to spawn sound area, but I don't know what can put in.

Code: Select all

        public void OnStartup()
        {
            IObjectSoundArea noise = (IObjectSoundArea)Game.CreateObject("SoundArea");
            noise.SetAmbientSound(  ?? );
}
0 x

User avatar
Gurt
Lead Programmer
Lead Programmer
Posts: 1884
Joined: Sun Feb 28, 2016 3:22 pm
Title: Lead programmer
Started SFD: Made it!
Location: Sweden
Gender:
Age: 34

Post by Gurt » Sat Nov 25, 2017 2:16 pm

Ambient sound ID is the same as the filename without extension found in the Data\Sounds\Ambient\ folder. Adding this to the ScriptAPI documentation next update to clarify.
1 x
Gurt

Post Reply