Forum rules - please read before posting.

Check if music is playing?

Hi,
I have a scene that plays different music depending on where you are, which is triggered by...a trigger.

But say if I walk through that trigger--the music plays, and I walk back into it, the song restarts again. I can fix that by using "resume last played", but the problem is if I walk through another trigger which changes the music then walk through the first one again, it'll start halfway through the song instead of the beginning.
So I was wondering if there was a check music is playing option so I can tell it whether to stop or resume?

Comments

  • Why not just disable the Trigger?

    Pass the Turn Off message to it via the Object: Send message Action, and it won't react to the Player until you turn it on again.  The Remember Trigger Action will save its enabled state.

    To answer your question though, the ID number of the current track can be returned with:

    KickStarter.music.GetCurrentTrackID ();

    This could be placed in a custom Action that compares it to a provided value.  See the "ActionCheckTemplate" file for a template Action script designed for "checking" Actions.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.