How do I give each instance a different sound?

0 favourites
  • 3 posts
From the Asset Store
Grenade Sound Library contains: 135 sounds 50 grenade sounds and 85 surface sounds
  • Hi guys, like the title suggest how do i add different sound to each instances.

    Lets say i have 10 instances of a circle.

    when i click on a circle it will play it will play a sound that has been assigned to it.

    can someone help?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys, like the title suggest how do i add different sound to each instances.

    Lets say i have 10 instances of a circle.

    when i click on a circle it will play it will play a sound that has been assigned to it.

    can someone help?

    You can try this method...

    First, add an instance variable of the circle named "Signature" that return a text value.

    Second, Assigned each circle with their own Signature in the Properties Bar per instance. In other words(Set each Circle a unique value of their instance variable named Signature.)

    Third, put this event in the eventsheet...

    Pick by comparison (If Circle.Signature = 1) then

    ----> Audio Play ClickSound1

    Pick by comparison (If Circle.Signature = 2) then

    ----> Audio Play ClickSound2

    etc.

    OR YOU CAN USE IID OR UID AS SUBSTITUTE FOR THE INSTANCE VARIABLE (But this tends to be inconvenient especially when using IID for it tends to change when some instances are destroyed)

    Pick by comparison (If Circle.IID = 0) then

    ----> Audio Play ClickSound1

    Pick by comparison (If Circle.IID = 1) then

    ----> Audio Play ClickSound2

  • hey thanks !...

    Im gonna test it on my project

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