Newbie Music Question!

Need help with using DizzyAGE then look here
Post Reply
Captain Jonesy
Your Backpack is Empty
Posts: 29
Joined: Mon Feb 15, 2010 12:27 pm

Newbie Music Question!

Post by Captain Jonesy » Mon Nov 15, 2010 4:23 pm

Hi!

I'm currently attempting to script fading in and out of different music tracks during the progression of my game but failing to do so (Nearly finished it). I've been using looking at the dizzy game called "The other side" for reference how to code an such method which is only game I've seen/come across that does this, I'm wondering if anyone knows of any other alternative games that has multiple music tracks which fade in and out which I analyse the code or any suggestions how to code such action?

Also has anyone here scripted music to be triggered via func_CollideObject on the level itself? Does this work?

Thanks in advance :v2_dizzy_walkman:

Jonesy

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Mon Nov 15, 2010 4:34 pm

Captain Jonesy wrote:Also has anyone here scripted music to be triggered via func_CollideObject on the level itself? Does this work?
yes, I've done it in a few games, and it does work. See DWD, TTD, RRD, and IID for examples.

Others tend to use the 'Open_Room' code instead, changing the music when you enter a room. This works just as well, and saves putting 'colliders' in the map, however I prefer the greater flexibility that colliders give you.
Image

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

Colin
Hard Boiled Egg
Posts: 594
Joined: Mon May 28, 2007 8:34 am
Location: Worthing, West Sussex, UK

Post by Colin » Mon Nov 15, 2010 7:59 pm

I used the collider method in Volcano island dizzy

place 2 colliders on your map like this
Image

the code to switch would be like this
func CollideObject_8006_1() { MusicFade( 1,1 ); MusicPlay(MUSIC_PRINCE); }
func CollideObject_8007_1() { MusicFade( 1,1 ); MusicPlay(MUSIC_CAVES); }

I think I copied this code, from how Jamie did it in RRD :v2_dizzy_confused2:
ImageImageImage

delta
Hard Boiled Egg
Posts: 3965
Joined: Fri Feb 09, 2007 7:08 pm
Location: North West
Contact:

Post by delta » Tue Nov 16, 2010 10:08 pm

Colin wrote: I think I copied this code, from how Jamie did it in RRD :v2_dizzy_confused2:
yup that's it almost exactly. One slight thing I'd change: move the colliders 2 'blocks' apart from each other, rather than one. This is because you can sometimes not collide with one of them if you double back on yourself, therefore not changing the music. If you widen the gap slightly, you don't get that problem. :)
Image

Image

"Quotes from the internet may not be genuine" - Abraham Lincoln

Post Reply