Forum rules - please read before posting.

Movie clip action removes audio source on game start

Hey friends! :D
I want to play a move that has sound. I have a Play movie clip action, and I check Include audio? and set an Audio source. When I run my game however, the Audio source is immediately set to None., despite the actual Audio Source not being removed. As such, the audio will fail to play. However, if I wait until the game starts, then reassign the Audio source, the audio plays fine.

Any idea why starting the game clears the Audio source field? I read ActionMovie.cs, and nothing there suggests this behavior to me, and there are no references to ActionMovie#sound in any other files, so it's not clear what code is actually clearing the field. Any ideas? (even just knowing the right place to step through code is probably sufficient)

Thanks yall! :)

Comments

  • Is the AudioSource you assign a scene object while the Action is in an asset?  That could cause such an issue, but I could fix that with a reference to a Constant ID.
  • Yup, that's exactly the situation. I'll add a constant id, thanks so much!!
  • That was a mental note for myself, actually.  I managed to squeeze it in for v1.53a.
  • Great, thanks so much!! (and for anyone who stumbles on this thread and hasn't yet picked up 1.53a, note that you can workaround by putting the actionlist in the scene, rather than an asset)
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.