Help with Doors + Music

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Help with Doors + Music

Post 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)
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Twinconclusive
Liquid Metal Slime
Posts: 976
Joined: Mon Oct 15, 2007 6:45 pm
Location: Tabletop

Post 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.
♪♪♪ Du du duuuu ♪♪♪
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post 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.
Last edited by JSH357 on Sat Sep 19, 2009 11:22 pm, edited 3 times in total.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Uncommon
Metal Slime
Posts: 720
Joined: Thu Oct 18, 2007 10:58 pm
Location: Savannah, GA

Post 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.
User avatar
JSH357
Liquid Metal Slime
Posts: 1340
Joined: Mon Oct 15, 2007 7:38 pm
Location: Columbia, SC
Contact:

Post 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.
Last edited by JSH357 on Sun Sep 20, 2009 12:35 am, edited 1 time in total.
My website, the home of Motrya:
http://www.jshgaming.com
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post 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.
Post Reply