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?
Zypherzemus Offline
Member

Posts: 94
Threads: 7
Joined: Jul 2011
Reputation: 0
#9
RE: Music problem?

(07-06-2011, 05:50 PM)DRedshot Wrote: 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


one last thing, by "name" you mean?
and the line in the OnLeave would be?
and they're both on the same hps file right?
just making sure
(This post was last modified: 07-07-2011, 01:29 AM by Zypherzemus.)
07-07-2011, 01:28 AM
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)