Problem with music when entering room (SOLVED)

Started by Zoolander, Fri 17/03/2006 00:00:20

Previous topic - Next topic

Zoolander

I don't know if this is the right plact to ask this, but it seems I have a bit of a glitch in my game. 

In a particular room, there are quite a few variables that can happen when entering depending on where you are in the game or what room you're coming from.  For all but one of these variables, I have one MP3 track that plays, and then  that one other variable has it's own music.

But now every time I enter the room, it plays a second of that one-variable music then goes to the music it should play.  This happens from whatever room I'm coming from.  When I come from the room where that music should play, it works fine.

Has this happened to anyone else?  Is there a way to fix it?

Ashen

How and where exactly are you starting the music? (Which script commands and Interaction.)
I know what you're thinking ... Don't think that.

Zoolander

I have all this scripted in the "player enters screen after fade in" interaction editor.
Here's the whole thing:
Code: ags

if (player.PreviousRoom==15 && show_greekphoto==1) {
  SetViewport(0, 0);  
PlayMusic(2);
character[MAN].SayBackground("How could she do this to me!");
  character[MAN].Walk(230,176, eBlock):
  Wait(20);
  character[MAN].SayBackground("Ahhhhhhhhhhhhhhhhhh!!!!!!!!!!!");
  character[MAN].Walk(355, 109, eBlock):
  character[MAN].ChangeRoom(-1);
  character[MAN].ChangeRoom(15,175,186);
  }
if (player.PreviousRoom==15 && show_greekphoto==0) {
PlayMusic(3);
character[EGO].Walk(127, 138, eBlock);
character[EGO].Say("Sheesh. How can I reach Hovanes?");  
}

if (player.PreviousRoom==25) {
PlayMusic(3);
  character[EGO].Walk(127,138,eBlock);
  }
if (character[EGO].PreviousRoom==5) {
PlayMusic(3);
     character[EGO].Walk(156,153,eBlock);
  object[1].Visible=false;
  }
if (character[EGO].PreviousRoom==31 && number_drawn_apartment==0) {
PlayMusic(3);
     character[EGO].UnlockView();
  character[EGO].ChangeView(1);
  region[1].Enabled = true;
  }
if (got_hammer==1 && got_marker==1 && character[GUY].PreviousRoom==8 && noticed==0) {
PlayMusic(3);
  character[EGO].Walk(112,128,eBlock);  
  character[EGO].Say("I wonder where that priest went to?");
  noticed=1;
  }
if (character[EGO].PreviousRoom==8) {
PlayMusic(3);
  character[EGO].Walk(112,128,eBlock);
}
if (number_drawn_apartment==1) {
PlayMusic(3);
      character[EGO].UnlockView();
  character[EGO].ChangeView(1);
    region[1].Enabled = false;
  }


Now here's an odd thing.  Just to try something, I put it back the way I used to have it - I removed all the PlayMusic(3)'s  from every variable including the PlayMusic(2) from that one variable.  And instead I just used the interaction editor and put one PlayMusic(3) at the beginning just to see what would happen.  So now there's no MUSIC2 in there - and it STILL plays a second of that music that isn't even scripted in.  Isn't that strange?

Gilbert

#3
Did you set a default music to play for that room ? Check it in the room pane (not the scripts) of teh editor.

I'm a bit tempted at whether I should move this to the beginners' forum.

Zoolander

Yes, that was it.  I never thought to look there.  Sorry, I thought it had to be something wrong with the program.  It just didn't make sense.

SMF spam blocked by CleanTalk