How do I make it easier on me on soundboards?

0 favourites
  • 2 posts
  • I've been making soundboards but it takes a lot of time. My method was, make a sprite when clicked stop all sounds then play sound. Its easy but when i have 100 sounds i have to write this condition ( well copy and paste it ) 100 and change the sprite clicked and the sound to play for every single one.

    My question is.. is there a way to.. when a sprite is clicked (family). Can a sound play that has the exact same name as the sprite. This would help me because all i have to do is make sure the sprite and soundfile has the same name for it to play. I tried this but couldnt find a way to do it in conditions.

    What I've been doing

    What I'm trying to do. play by sprite name

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Put the relevant sprites in a family and use a family instance variable, not the name of the object. So if clicking it would play song1, then variable on that object is set to song1, and if an object would play song2 then set the variable of that object to song2.

    Then in one event you can say, on family clicked : play audio (by name) ""&family.variable

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