YolkfolkThe Dizzy Fansite 2 logged in0 playing
Community discussion

Newbie Music Question!

Started by Captain Jonesy on 15 November 2010 • 3,604 views

4 posts
#54834
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 {yolkfolk}:music:

Jonesy
👍 0
#72085
[quote data-userid="317" data-postid="54834"]

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

[/quote]

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.
👍 0
#72087
I used the collider method in Volcano island dizzy

place 2 colliders on your map like this


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 {yolkfolk}:scratch:
👍 0
#72096
[quote data-userid="74" data-postid="72087"]

I think I copied this code, from how Jamie did it in RRD {yolkfolk}:scratch:

[/quote]

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. :smile:

👍 0