Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - AuT

#1
TLDR: If entering Room 1 from Room 3 play aMusictrack001. If entering Room 1 from Room 2 continue playing aMusictrack001 (not restart playing aMusictrack001).

Hello,

I'm working on my first game in AGS. Here are the rooms in regards to the question I have about music continuity.

Room 1 (SP's Office) (aMusictrack001):
D1 leads to the "World Map" (Room 3). D2 leads to "Jaw's Office" (Room 2).


Room 2 (Jaw's Office) (aMusictrack001):
D3 leads back to "SP's Office" (Room 1)


Room 3 (World Map) (aWorldmaptheme001):
Clicking on the office building leads back to "SP's Office" (Room 1).


So here's my question. The starting room is Room 1 (SP's Office). To start the music (aMusictack001) I have:

Code: ags

function room_Load()
{
  aMusictrack001.Play();
}


When the player goes to D2 to enter room 2 the music keeps playing. This is good. It doesn't restart, it just continues (because I don't have any code in Room 2 to start new music). However, going from Room 2 back to Room 1 the song restarts. I understand that it's because of the line of code I've included in Room 1. So, how can I have it just continue playing the song going from Room 2 back to Room 1? These two rooms are part of the same building, so I would like the music to stay continuous. When the player goes through D1 (which leads to the World Map), the track changes to aWorldmaptheme001 music. So when they enter back into the office, I would like aMusictrack001 to start playing.

TLDR: If entering Room 1 from Room 3 play aMusictrack001. If entering Room 1 from Room 2 continue playing aMusictrack001 (not restart playing aMusictrack001).
SMF spam blocked by CleanTalk