Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Music crossfades like in Ocarina of Time

:sad:

I've looked around quite a bit, but i can't seem to locate a script that will allow me to do this:

I want to emulate the way music is handled in Zelda Ocarina of Time, when you enter a building, the music becomes a muffled version of the main song. Is there a way to switch songs but have it start up at the same point that the previous song was playing at?

example:

TownMusic.mp3 and TownMusicInside.mp3 are the same song but the inside one sounds far away and muffled.

When you enter a building TownMusic.mp3 is playing, lets say at 1:30 into the song.

I want a script to change the BGM to TownMusicInside.mp3 but start it playing at 1:30. If you go back outside 10 seconds later, TownMusic.mp3 resumes at 1:40. 

Is that possible? Seems like it'd be difficult, I can see the basic play bgm script commands don't have any more options than the in-screen even commands.

If anyone could help me out, that'd be great.

J
 
lulz.

There are many things wrong with your post. Starters is that is in the wrong place. And that you don't need a script to do this. All you have to do is this:

Town.MAP = Town.mp3 playing at 100% volume. Townhouse.MAP = Town.mp3 at 70% volume.
All you have to do is change the volume of the same mp3 when inside the house to make it sound muffeled. If you don't know how to do this... Give up. Give up NOW!

Regards
Your Residential Welsh Hamster
 
Why don't you do this:

Autostart Event on Outside Map
Play bgm Town vol > 0
Play bgs Townin vol = 0
Erase Event

AutoStart Event on Inside Map
Play bgm Town vol = 0
Play bgs Townin vol > 0
Erase Event
 
Thanks guys. These commands won't reset the song? I'll play wtih it. I just assumed it would take a script to do this?

The volume thing is good hamster but I do want to add other ambient noise and stuff to the inside track, so it wouldnt just be the same thing.

I will try what you said me(tm), if it doesnt reset them, i think im good. The bgs will loop?

(I know the post was in the wrong place, i posted a comment about that)
 
Well if you want to add more stuff to the inside track you could do it with a bgs. Just a suggestion (not the best one in the world).

Regards
Your Residential Welsh Hamster

(And please, call me Hamstt  :wink:)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top