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

Get help using Construct 2

Post » Thu Apr 21, 2016 2:10 pm

Message: folcochofo can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
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:
https://drive.google.com/open?id=0B5soz ... i00QjBZLVE

Event sheet cap:
https://drive.google.com/file/d/0B5sozB ... sp=sharing

Thanks!
B
3
Posts: 6
Reputation: 187

Post » Thu Apr 21, 2016 2:15 pm

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
B
3
Posts: 6
Reputation: 187

Post » Thu Apr 21, 2016 2:52 pm

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

enemyUID.capx
B
66
S
24
G
7
Posts: 1,514
Reputation: 11,039

Post » Thu Apr 21, 2016 6:23 pm

Message: folcochofo can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
korbaach wrote: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
B
3
Posts: 6
Reputation: 187

Post » Thu Apr 21, 2016 8:42 pm

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
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Thu Apr 21, 2016 11:08 pm

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...
B
3
Posts: 6
Reputation: 187

Post » Fri Apr 22, 2016 2:19 am

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.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,283

Post » Fri Apr 22, 2016 12:16 pm

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.
B
3
Posts: 6
Reputation: 187


Return to How do I....?

Who is online

Users browsing this forum: adventurist, Blendi1223, dop2000 and 26 guests