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
Playing different music in different areas
Andross Offline
Junior Member

Posts: 38
Threads: 1
Joined: Oct 2010
Reputation: 0
#3
RE: Playing different music in different areas

I would use collision callbacks for the areas surrounding rooms.
AddEntityCollideCallback("Player", "RoomArea1", "OnCollideRoom1", false, 0);
Then, start or stop the according music.
void OnCollideRoom1(string &in parent, string &in child, int state)
{
    if (state == 1) // start
        ....
    if (state == -1) // stop
        ....
}
The functions for the music would be PlayMusic() and StopMusic(). Music sounds should loop automatically until they are stopped explicitly.
(This post was last modified: 01-11-2011, 11:07 PM by Andross.)
01-11-2011, 11:06 PM
Find


Messages In This Thread
RE: Playing different music in different areas - by Andross - 01-11-2011, 11:06 PM



Users browsing this thread: 1 Guest(s)