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
Music problem?
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#4
RE: Music problem?

You may need to use a globalvar
Try greating a global.hps file (if your map doesn't already have one) and add the line:

void OnGameStart()
{
SetGlobalVarInt("name" , 0);
}

then you can create a line in your map .hps file, under void onleave(), which sets this globalvariable to 1.

Finally under void OnEnter() create a couple of if statements:
if (globalvar == 0) play "music1"
else if (globalvar == 1) play "music2"

This way will definately work, but there may be a more efficient way of doing it
Tongue

07-06-2011, 05:50 PM
Find


Messages In This Thread
Music problem? - by Zypherzemus - 07-06-2011, 05:00 AM
RE: Music problem? - by Juby - 07-06-2011, 11:21 AM
RE: Music problem? - by Zypherzemus - 07-06-2011, 05:37 PM
RE: Music problem? - by DRedshot - 07-06-2011, 05:50 PM
RE: Music problem? - by Zypherzemus - 07-07-2011, 01:28 AM
RE: Music problem? - by Zypherzemus - 07-06-2011, 11:00 PM
RE: Music problem? - by Tanshaydar - 07-06-2011, 11:07 PM
RE: Music problem? - by DRedshot - 07-06-2011, 11:18 PM
RE: Music problem? - by Tanshaydar - 07-06-2011, 11:25 PM
RE: Music problem? - by DRedshot - 07-07-2011, 01:41 AM
RE: Music problem? - by Zypherzemus - 07-07-2011, 02:47 AM
RE: Music problem? - by DRedshot - 07-07-2011, 12:43 PM
RE: Music problem? - by Zypherzemus - 07-07-2011, 07:36 PM
RE: Music problem? - by Zypherzemus - 07-07-2011, 10:27 PM
RE: Music problem? - by DRedshot - 07-08-2011, 02:01 AM



Users browsing this thread: 1 Guest(s)