How do I play a sound for every object instance without...

0 favourites
  • 8 posts
From the Asset Store
Create your own Behaviors in Construct 3 using events! Custom Expressions, Signals & Triggers Behavior Addon Pack
  • Hi there, i've been learning the basic training and trying to add my own ideas to the basic topdown shooter to learn some more.

    The thing is that i want to play a sound of walking every time an enemy (same object) is on screen moving. I think i could do that but the sound of the walking of all the monsters seems to be in sync so i only hear one strong walking. How ca i solve this? i can send the capx (dont know if i can post it here).

    Tha capx:

    drive.google.com/open ... i00QjBZLVE

    Event sheet cap:

    drive.google.com/file/d/0B5sozB ... sp=sharing

    Thanks!

  • I see now i cant post urls here until i have 500 rep. Nice for the noobs. Cool 21 century forum...

    So if someone wants the jpeg of the event sheet or tha capx i can send it. Cheers

  • naybe you can use enemy.UID for sound tag...

    enemyUID.capx

  • naybe you can use enemy.UID for sound tag...

    https://app.box.com/s/07oektbtwaprj89j598wdo4z3phhx4bo enemyUID.capx

    Thanks for answering!

    I've tried with your solution but no luck.

    I'm writting something wrong in the sheet event i'm certain.

    I get a "machingun" type of sound from one instance or not sound at all.

    I send you through a note in your deviant art profile a google drive link so maybe you can check the last lines of the event sheet and perhaps discover whats wrong.

    BY the way, cool art you posted on deviant!

    Thanks a lot

  • I don't know how many monsters may be on screen at the same time but you could create multiple copies of the walking sound effect, Walking_1, Walking_2, Walking_3, etc.

    Then use Audio > Add Delay Effect and assign a different amount of delay to each.

    You can then use Play Audio By Name and Use Choose( "Walking_1", "Walking_2", "Walking_3" ) to assign the Walking sound randomly to each monster when created or spawned.

    You will also need to create a condition to assign the delays for each Walking track

    Audio> Is Tag Playing > Walking_1 > Add Delay Effect

    Audio> Is Tag Playing > Walking_2 > Add Delay Effect

    Audio> Is Tag Playing > Walking_3 > Add Delay Effect

  • Thanks TheDom but i dont think this would be the best solution for what y want to do.

    Koorbach showed me how to do it but i'm failing to put this in the event sheet. I i only could post here the capx would be easier for you guys to help me and for me to understand...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was thinking about it some more and I haven't tried it but you could probably accomplish it with just the one sound file by using Add Delay Effect and using "Choose" or "Random" to set a small delay so it's different every time.

  • HEy! I knew i was writting it down wrong in the event sheet!

    I didnt realized that the subcondition -audio- is tag playing "enemy"&Enemy.UID was inverted!

    Thanks to korbaach and thedom for your kindness.

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