Forum rules - please read before posting.

Bug: Audio sources cannot be parameterised

An audio source passed to an action list through a parameter, and then used in the Sound -> Play [Sound Object: Parameter] action, simply does nothing. No audio, no errors, nothing :(

A constant ID has been set, and the audio works fine when played through the one-shot action in my testing. Just not the regular "play" action.

Comments

  • Please post bugs in the Technical Q&A forum in future.

    Can't recreate this error from just this - can you provide steps to reproduce / more detail?  e.g. Are you calling this from an ActionList asset?
  • edited September 2015
    Ah, sorry, will do!

    My exact process is as follows:

    - Create an action list (let's call it "Test Action List"), under assets, with 1 parameter set as a Game Object.
    - In Test Action List, create an action, type Sound, Play. Sound object is set as parameter 1. Add in an audio clip.
    - Now add an Audio Source to a GameObject ("Test GameObject").
    - Create a hotspot object ("Test Hotspot") on top of that object. Create an interaction for it. Set that interaction to be Action List, Run. Source: Asset File. Actionlist Asset: Test Action List. Drag in Test GameObject as the parameter. Run from start, don't wait until finish.

    Then run the game. Interacting with the hotspot does nothing.

    Here are screenshots of my hotspot's interaction:


    ... and Test Action List


  • This isn't a bug - you're confusing "Sound object" with an AudioSource component.  The Action needs a Sound component to be attached to the AudioSource gameobject.  Normally this is handled automatically because the field only accepts Sound components, but when you make use of parameters "GameObject" has to cover all.
  • Oh, wow, simple as that. Thanks Chris, sorry for the trouble!

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.