Copying Enemies (Platform Game)

  • 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:

    dropbox.com/s/4hf4jnai2l30s71/helpnd.capx

    Oh and one more, do I need both of sound effect files formats (ogg & m4a) or just one?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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:

    dropbox.com/s/9ipfoib9eb82bhz/helpndfixed.capx

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