Copying Enemies (Platform Game)

Get help using Construct 2

Post » Sun Mar 03, 2013 12:46 am

Soo I have small problem, I make enemy and he is making sound when specific events are done. All work well, he is making sound every 1 second. But when I copied him and put next to oryginal, what i want to hear is 2 enemies making sound every 1 second. Instead of that I still hear only one enemy. The same is with overlapping. When they overlap my player he should lose 2 HP instead of 1 every second. I make For Each event but that don't help with that.
Here I made .capx where you can see what I'm talking about:
https://www.dropbox.com/s/4hf4jnai2l30s71/helpnd.capx?m

Oh and one more, do I need both of sound effect files formats (ogg & m4a) or just one?Roal4652013-03-03 00:55:10
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Sun Mar 03, 2013 1:58 am

Hi, what about giving the sound a tag like "enemysound" and before playing the sound, add a condition to check if that sound is already playing? :)

For the 2nd question, for each should be working, I'm on my phone now so I can't view you capx, but the problem may lie in some other conditions.

The last question, it depends on your final export format. For most exports, I think C2 automatically removes the irrevelavnt and unneeded formats on export.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Sun Mar 03, 2013 5:15 am

Sound playing and taking damage is the same problem. There are 2 enemies but game see them like one. I think that event System>Every 1 second making that problem or I put For each enemy event in bad place.

[EDIT]
I fix that by myself! Instead of using System>Every X second I make instance vairables that works like a timer, one for sound and one for damage player. Here is .capx with my solution if someone have same problem like me:
https://www.dropbox.com/s/9ipfoib9eb82bhz/helpndfixed.capx?mRoal4652013-03-03 14:40:21
B
9
S
3
G
3
Posts: 36
Reputation: 2,433


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests