Play Audio At Specific Object Instance

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Is it possible to set an audio file to play from a specific instance id or unique id for an object? In this situation I have pairs of sounds (ie "bang" & ******* that I would like to come out of a single instance of an object (ie "ExploderObject"). It might look something like

    Play "bang" not looping at volume 0db at object ExploderObject[1] (inner angle 360, outer angle 360, outer gain 0dB) with tag "bangsound"

    Play ****** not looping at volume 0db at object ExploderObject[1] (inner angle 360, outer angle 360, outer gain 0dB) with tag "poofsound"

  • do you mean to have the odd instances play say ****

    and the even to play bang?

  • No, I want a single instance of ExploderObject to play both **** and bang. The reason I'm looking for this is so that the stereo positioning of **** and bang both come from the one instance but I'll still be able to feed set volume and effects through their separate tags - poofsound and bangsound.

    Another way to accomplish what I'm looking for would be a "set position" action where I could set the x and y position of a sound by tag name. However, as far as I know, that function is available.

    Any insight into either of these would be great. Thanks.

  • You just pick the instance you want first, then play at that object.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • YES! Some of the simplest things are so hard to find. I had almost given up hope of thinking it was even possible. Thank you very much.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)