Page 1 of 1

Help with Doors + Music

Posted: Sat Sep 19, 2009 10:52 pm
by JSH357
OK, I have noticed that using doors causes the current music to stop, then the default music gets loaded and the autorun script starts. (not necessarily in that order, i guess) I confirmed this with show value.

This is kind of bad for my game. I use lots of doors that lead to maps with the same song being loaded in the autorun, and the song restarts itself every time the player walks through a door.

Is there any way, short of making every door an NPC that loads a plotscript to teleport the heroes, to make the music continue instead? I assume that the "Ambient music" checks for the current song and continues if it is present, as that is what I used to use years ago and never ran in to this problem.

If that's the only way, I'll have to grin and bear it, but I just want to make sure because it's going to bloat my scripts a good bit. (Even if I use arguments right off the map)

Posted: Sat Sep 19, 2009 11:12 pm
by Twinconclusive
Edit General Map Data wrote:Ambient Music: -same as previous map-
But this could get messy if you've got multiple previous maps.

Posted: Sat Sep 19, 2009 11:20 pm
by JSH357
Hmm... it MIGHT work, actually. I do foresee one difficulty (how does the game know when not to play a song during the autorun script?) but I could just use currentsong to check if no song is playing.

Does "Same as previous map" include the title screen or not? If it does, then game overs/resets will be problematic too. EDIT: Uh, or I could stop song in my gameover script and put an empty track on the title screen. Or just the second. Good thinking, TwinHamster!

It's still clunky as slime, though.

Posted: Sun Sep 20, 2009 12:29 am
by Uncommon
I believe if two maps have the same song set as Ambient Music then it will continue as you switch between them, but I'm not really clear on what kind of effect you're going for here.

Posted: Sun Sep 20, 2009 12:34 am
by JSH357
Uncy, the song can change based on tags, so I could not use the Ambient Music option cleanly. That was my original problem. Using ambient + an autorun tends to make one song start annoyingly and then go in to the next one. And if the second map is using the same song as the previous via an autorun (which is NOT the default song for the map) then that's very problematic. It is a potential thing that could come up in my game too.

Posted: Sun Sep 20, 2009 2:05 am
by Mogri
I did something similar for Phantom Tactics. All of the maps are on -same as previous map- and the music is done entirely by plotscripting. Works nicely.