Each room to have own Music track.

Started by freeplayer, Sat 08/03/2014 14:11:01

Previous topic - Next topic

freeplayer

Hello all.
I've tried search in the manual and also over net this issue but couldn't find exactley.

I want to have a track of music / room. Each room, to play the designated music track once entered in room.
I realised that with the code:
Code: ags

function room_FirstLoad()
{
     aMusic1.Play();
}

That I set in the both rooms i have. But, there is a problem. When i go from room 1 to room 2, the music changes, so it's ok. But once i go to room 1 from room 2 (back) the music from room 2 plays and no other changes.

Would apreciate help to set each room to have a soundtrack on entry, EACH time!

Thanx!

Khris

Just use Before/AfterFadein as opposed to FirstLoad, which is associated with the "first time player enters room" event and is only called once, like the text implies.

freeplayer

Solved with
function room_AfterFadeIn() in both rooms script!
Wierd, i tink i tried that before... hmm.
Anyway, thanx!

SMF spam blocked by CleanTalk