Alternate music on adjacent tiles may result in silence

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Alternate music on adjacent tiles may result in silence

Post by Trantor »

Not sure if this is technically a bug or a suggestion, but it is annoying enough that I post it here.

If you want to change the ambient music when you cross a certain threshold back and forth, my idea was to do this: On two adjacent tiles, put a trigger that activates the appropriate music and a relay which deactivates the music from the other "sector". If you move really quick over those two tiles in the game, it is possible to turn all music completely off. Right now, I spread the musical triggers over three tiles, with the middle one just deactivating and the outer ones each activating the appropriate music, but this results in silence if you stay on the middle tile.

Or am I doing something wrong with using a relay to deactivate ambient music?
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

I would have thought you need to put the trigger for BOTH musics on the SAME tile -- turning one on and the other one off, otherwise you will get inconsistencies. You need both actions to happen at the same time, and the only way of guaranteeing that is having the trigger on the same tile.
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

:oops: Once again, I didn't think of the obvious and made life more complicated for me than necessary. -.- I really should learn to think in simple ways...
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Heh, no worries, often the simplest solutions are the hardest to find! :)
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

I just realized that your solution doesn't really help me. It's good if you want to change a music when you go from sector A to sector B and be done with it. But I want to have a separate music for sector A and sector B that changes every time you go back and forth. A possibility would be two Constant Weight triggers on the same tile, but that would have the disadvantage that you have to walk forward in order to trigger the correct music. Sidesteps and walking backwards would result in an undesired effect.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Hmmm, I don't understand! :( Let me try to:

You have a music for sector A and a music for sector B.

Whenever you enter sector B, it's music should start playing, and sector A music should stop.

Whenever you enter sector A, it's music should start playing, and sector B music should stop.

OK, so breaking that down, it's clear my solution doesn't work. Your original solution seems therefore better. However, instead of using relays, you simply need to change it:

1) Place two triggers on each tile in in sector A. One will ACTIVATE sector A music and the other will DEACTIVATE sector B music

2) Place two triggers on each tile in in sector B. One will ACTIVATE sector B music and the other will DEACTIVATE sector A music

I don't think the result of this is any different from what you originally did other than omitting the relays so I honestly can't see why this wouldn't work unless there is a bug in RTC.
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

First of all: Congratulations, you understood me. :D
Your solution is indeed exactly what I did, minus the relays (so I only have on trigger that activates both the music and the relay which in turn deactivates the music). I can try having two triggers, one that activates the one music and one that deactivates the second music. If that also doesn't work, I suppose it's a bug. If it does work, it leaves me wondering why it doesn't work with the relays... :?:
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

There may be some subtle behaviour going on that we're unaware of -- you did say that QUICKLY moving causes the problem.

RTC's internal clock runs at 6 ticks per second as far as I know. I don't think this is fast enough to cover a player who's moving very fast over lots of triggers -- but assuming that EVERYTHING is tied to that speed (including player movement), then it should be impossible for RTC NOT to react to triggers, however fast the player is moving.

You'd have to throw this one back at GG -- I'm sure he can explain what's going on far better than me!

Now, I really should be doing some work... ;)
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

I also thought that the player couldn't move quick enough to "ignore" some triggers, but maybe that's the problem.

And good point about that work thing... :wink:
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

I can't reproduce this problem, are you sure it's a real issue not some kind of optical (auditory!) illusion?

Have a look at the DM-II dungeon - that has triggers that change the music as the party moves from one area to another. If there's still an issue, then can you send me a example file and I'll take a closer look.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Did you solve this Trantor?
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

I didn't, thanks for reminding me Gambit. I just created an example to show what goes wrong (funnily, I can't seem to reproduce the "wrong music" phenomenon, but I can make the dungeon silent with it). If you are also interested in this Gambit, just PM me your email address and I'll sent you the test dungeon as well.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Alternate music on adjacent tiles may result in silence

Post by Gambit37 »

I've noticed that RTC randomly quits playing all sound effects from time to time. It's not reproducible in a consistent way and happens in all sorts of dungeons completely randomly. I've had sound cut out completely in Sukumvit, Surgical Strike and some of my own work.

I suspect there is a bug in the FMOD library that causes this. Maybe that's what messes up your music Trantor?
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Alternate music on adjacent tiles may result in silence

Post by Gambit37 »

On another note, there is a much better way of managing music changes across sectors:

In Trantor's example, he only deactivates the music in sector A when entering sector B, and vice versa. This is actually not very efficient if you do this in many places. It also doesn't allow for the fact that player actions might have caused other music to be playing that you didn't expect...

A better way is to change the Deactivate Music trigger to instead Activate an ACTION. This ACTION should be set to Deactivate objects of type WALLIETM_MUSIC_AMBIENT. This means that ALL music will stop playing, regardless of where it is in the dungeon. Much neater!

Then, with your specific music activating trigger, just ensure it has a delay of 1 tick, so that it starts AFTER the other music deactivations have taken place.

This makes it easier to ensure that ALL music is stopped before starting the one you want :-)
Post Reply