Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SmootH on Wed 08/03/2006 04:33:10

Title: Setting music to switching rooms.
Post by: SmootH on Wed 08/03/2006 04:33:10
This may seem like a really noob request  and maybe I don't know the right terminology to find the info I require via the manual, or maybe it can't be done but this is what I'd like to do:

I've set up two rooms, when the character moves from one room to another there is a fade out of the first room and a fade into the next. What I'd like to have is music (an MP3 if that makes a difference at all) starting on the fade out of the first room and continuing on into the next room. There must be a scripting function to do this but my knowledge of this program is limited at best.

Thanks for the help!

Modify: Gilbot you are right in saying the music will continue from one room to the next and the play music function is working fine. Thanks for the input.  But I have yet to find a way of triggering music to start playing on the fade out of the initial room.
Title: Re: Setting music to switching rooms.
Post by: Gilbert on Wed 08/03/2006 05:29:41
I'm not sure, but I think if you don't set the "play music on room load" option in the second room, when you leave the first room and move there the playing music will not be stopped, so you can just play the new music track just before you change room.

For example if you use interaction editor:
  Game - play music
  Player - go to a different room


Or, if you use scripting:
  PlayMusic(2);
  player.ChangeRoom(2);


Title: Re: Setting music to switching rooms.
Post by: Scorpiorus on Wed 08/03/2006 20:32:15
QuoteBut I have yet to find a way of triggering music to start playing on the fade out of the initial room.

You can probably start it on the Player leaves room event in the first room.

Or do as Gilbert suggests -- i.e. just before you run the room change command.