How to have different music on each level?

Non-platform specific questions.

How to have different music on each level?

Postby msv83 » Sat Jan 05, 2008 8:52 am

I've just started working with Game Editor, and have so far started learning a few bits from watching the tutorials and browsing this forum for help on things that weren't covered there :)

Anyway, I have now run into something I don't understand how to do. I want to create a game with several levels, and have so far created a start-menu with a start button and options etc. and the first level. I want the startmenu to play a music track, and when the player clicks on the Start-button they will start the game and the first level's music starts playing instead. But of course, the music for the menu just keeps playing...

I have noticed there is a "stopSound" function, but I haven't found out how to use it for this, or where to put it to make it work.
msv83
 
Posts: 22
Joined: Mon Dec 31, 2007 3:17 pm
Score: 0 Give a positive score

Re: How to have different music on each level?

Postby j2graves » Sat Jan 05, 2008 9:10 am

use script editor to use "playmusic2" because that allows you to make the loop infinite by setting it to zero. about different music, if you have a playmusic or a playmusic2 action, it will automatically stop the previous music.
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: How to have different music on each level?

Postby Bee-Ant » Sat Jan 05, 2008 10:09 am

Create an actor called "MusicChanger". When it's colliding with the player destroy that MusicChanger and change the music...it's quite easy... :D :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: How to have different music on each level?

Postby msv83 » Sat Jan 05, 2008 4:01 pm

Thank you very much for your help. Made it work now :D
msv83
 
Posts: 22
Joined: Mon Dec 31, 2007 3:17 pm
Score: 0 Give a positive score

Re: How to have different music on each level?

Postby j2graves » Sat Jan 05, 2008 5:25 pm

u r welcome. :D
No games to my name...
User avatar
j2graves
 
Posts: 1302
Joined: Thu Aug 16, 2007 6:42 pm
Location: on the other side of infinity
Score: 19 Give a positive score

Re: How to have different music on each level?

Postby Bee-Ant » Sun Jan 06, 2008 7:05 am

We're waiting for your next question... :D
Btw, this topic should placed in Game Development... :roll:
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron