Forum rules - please read before posting.

Changing music from script?

edited February 2017 in Technical Q&A
I'm writing a middleware for Ink which handles the display of text and such in my game and would like to use AC to manage my music/sound stuffs (since it's been doing a great job so far in the rest of the game).

However - despite my best efforts I can't seem to figure out how to get at the Music object to tell it to play the track I want.  I've found it in the API and the function call is all set up and ready to go.  Documentation says there should be an entry for it in KickStarter - but I'm not finding it.

Anyone know where that object's reference is being stored? I'd look for it through GameObject since I assume there's only one Music object at a time - but that's a bit of a waste if there's a reference already and I just don't know where that is.

Comments

  • edited February 2017
    The Music engine can be gotten using GetMusicEngine:

    Music music = KickStarter.stateHandler.GetMusicEngine ();

    I shall see about adding a KickStarter reference for consistency.


  • Hey, if you can let us know about your progress with integrating Ink. :)
  • The actual integration's mostly done at this point - I'm just mucking around with getting all my UX and so forth done.

    Navigation, choice selection, using tags to change the game's music/sounds, et cetera is all up and running.  Music is being sent through AC and I'm working on injecting Ink variables into AC so that I can save data from the runs in Ink back to the AdventureCreator portions of the game.
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.