Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cant have PlaySoundAtEntity with SetSwingDoorClosed?
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#16
RE: Cant have PlaySoundAtEntity with SetSwingDoorClosed?

(05-05-2011, 11:35 AM)Ge15t Wrote: Ok this is my new problem:

void OnStart()
{
AddEntityCollideCallback("Player", "CandleArea", "BlowOutCandles", true, 1);

}

void BlowOutCandles(string &in entity)
{

    SetLampLit("blowout_1", false, false);
    SetLampLit("blowout_2", false, false);

}

Ok so im trying to get candles to 'blowout' when i collide with the CandleArea script. The game loads but nothing happens when I enter the area.. not too sure whats going on here

The function is not getting called because the syntax (the part after BlowOutCandles in parantheses) is wrong. Since the callback is AddEntityCollideCallback, the syntax should be "(string &in asParent, string &in asChild, int alState)"

That should fix it Smile
05-05-2011, 12:02 PM
Find


Messages In This Thread
RE: Cant have PlaySoundAtEntity with SetSwingDoorClosed? - by Roenlond - 05-05-2011, 12:02 PM



Users browsing this thread: 1 Guest(s)