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
Help with sound problem
Eyeball27 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2010
Reputation: 0
#1
Help with sound problem

I added a music cue into my script, and it works perfectly, however, whenver I start my map this music cue, even though untriggered, will play 4 instances of itself simultaneously, making it not only unwanted but painful as well.

I have removed the music cue from my script, and it still happens, leading me to think that the problem might be elsewhere. Any insight would be great.
11-28-2010, 11:40 PM
Find
Akumasama Offline
Member

Posts: 122
Threads: 2
Joined: Nov 2010
Reputation: 0
#2
RE: Help with sound problem

Post the script please Smile
11-29-2010, 04:01 PM
Find
Eyeball27 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2010
Reputation: 0
#3
RE: Help with sound problem

Here is the portion with the sound cue. (scare_whine_loop1)

void collideroom1(string &in asParent, string &in asChild, int alState)
{    
    SetSwingDoorClosed("door_2", true, true);
    
    SetSwingDoorClosed("door_1", true, true);

    SetSwingDoorLocked("door_2", true, true);
    
    SetSwingDoorLocked("door_1", true, true);
        
    StartPlayerLookAt("door_2", 2.0f, 1.0f, "");
    
    PlaySoundAtEntity("", "scare_slam_door", "door_2", 0, false);
    
    PlayGuiSound("react_scare", 1.5f);
    
    PlayMusic("scare_whine_loop1", false, 1.5, 0.1, 10, false);
    
    GiveSanityDamage(5.0f, true);
    
    AddTimer("Scare2", 0.5f, "stopstare");
}

But even when I disable the sound cue, even remove it from the script entirely, the sound still plays when I load the map.

I'm very new to scripting and I fool around with stuff till it works (for example, Im pretty sure I'm using PlayGuiSound wrong, but it does work)
(This post was last modified: 11-29-2010, 07:09 PM by Eyeball27.)
11-29-2010, 07:08 PM
Find
LoneWolf Offline
Senior Member

Posts: 308
Threads: 43
Joined: Sep 2010
Reputation: 0
#4
RE: Help with sound problem

Are you using script areas for the sound files? instead of placing sound icons place script area and name it what ever you want, Jens todl me this not long ago and it works well.
11-29-2010, 07:22 PM
Find
Eyeball27 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2010
Reputation: 0
#5
RE: Help with sound problem

That entire function is tied to a script area, if that's what you mean...

Again, I don't think this is a script problem, as the problem persists even when I've removed the sound cue from it. (and yes, I've saved)
11-29-2010, 11:03 PM
Find
Eyeball27 Offline
Junior Member

Posts: 13
Threads: 3
Joined: Nov 2010
Reputation: 0
#6
RE: Help with sound problem

Problem solved. Turns out I had some random sound entities hidden in a pillar of all things D:
11-30-2010, 01:21 AM
Find




Users browsing this thread: 1 Guest(s)