The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Activate Sound entity
anzki Offline
Member

Posts: 88
Threads: 6
Joined: Apr 2010
Reputation: 1
#1
Activate Sound entity

Here is code considering sounds:
void CollidePianoArea(string &in asParent, string &in asChild, int alState)
{
  SetEntityActive("SoundPiano", true);
  AddTimer("", 45.0f, "EndPiano");
}

void EndPiano(string &in asTimer)
{
  SetEntityActive("SoundPiano", false);
}
And this is in void OnStart:
AddEntityCollideCallback("Player", "PianoArea", "CollidePianoArea", true, 1);

However it does not trigger when it should but instead it plays the sound right in the beginning. Also I have other similiar sound and it does the same.

Plus I have simple shelf that is set to inactive,(as all those sounds) but yet it is active right in the start of the map...

Edit: But few other entities are inactive as they should :S

[Image: 2qnr5av.png]
10-18-2010, 12:11 PM
Find


Messages In This Thread
Activate Sound entity - by anzki - 10-18-2010, 12:11 PM
RE: Activate Sound entity - by jens - 10-18-2010, 12:55 PM
RE: Activate Sound entity - by anzki - 10-18-2010, 01:25 PM
RE: Activate Sound entity - by jens - 10-18-2010, 01:47 PM
RE: Activate Sound entity - by anzki - 10-19-2010, 10:49 AM



Users browsing this thread: 1 Guest(s)