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
Play Sound Problem
pawsUp1703 Offline
Junior Member

Posts: 45
Threads: 16
Joined: Jan 2011
Reputation: 0
#1
Play Sound Problem

Hello :) I'm very new at building with the editor but I think I made a quite good map and scripting isn't as difficult as i thought.. until now...
I made a trigger area and used the AddEntityCollideCallback to make somethign happen when the player reaches this area.
However a sound i wanted to trigger doesn't play but all the other things work:
AddEntityCollideCallback("Player", "DoorSlamArea1", "DoorSlam1", true, 0);

void DoorSlam1(string &in asParent, string &in asChild, int alState)
{
    SetSwingDoorClosed("castle_arched01_3", true, true);
    SetSwingDoorLocked("castle_arched01_3", true, true);
    SetLampLit("torch_static01_4", false, true);
    SetLampLit("torch_static01_3", false, true);
    SetLightVisible("PointLight_9", false);
        PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
        GiveSanityDamage(5.0f, true);


}

has anybody an idea why everything except the sound works?
and how i can make the sound play?

It doesn't matter if you love him, or capital H.I.M.
Just put your Paws Up, 'cause you were Born This Way baby!
01-07-2011, 09:44 PM
Find
Makiavel Offline
Junior Member

Posts: 13
Threads: 2
Joined: Jan 2011
Reputation: 0
#2
RE: Play Sound Problem

*I misread the question and wrote wrong answer here, sorry*
Maybe it has something to do with fadetime = 0 (perhaps it always has to be>0?)
(This post was last modified: 01-07-2011, 11:15 PM by Makiavel.)
01-07-2011, 11:09 PM
Find
Russ Money Offline
Senior Member

Posts: 360
Threads: 25
Joined: Dec 2010
Reputation: 4
#3
RE: Play Sound Problem

I have a similar code and it's set to 2.0, so try

PlaySoundAtEntity("", "react_scare.snt", "Player", 0.1, false);
01-08-2011, 01:26 PM
Find




Users browsing this thread: 1 Guest(s)