How do I fix this enemy animation error?

0 favourites
  • 3 posts
From the Asset Store
Be discreet and rescue your friends from behind enemy lines.
  • Hello.

    So, everything is looking nice, as always. But I can't put more then 2 enemies of the same type, because every time you kill the 2nd enemy, it stops shooting at you, but it doesn't stop rotating and it doesn't apply the "Dead" animation. It doesn't really change the gameplay, but it's not pretty nor realistic. I've tried creating clones of enemies, but that'll take too long and too much effort in a game like this, where you shoot everything into bits (not really into bits.)

    .capx link: mediafire.com/file/zvdwvdu9j5yklco/TopdownWarHeroSimulator2016.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • First of all, it would be very helpful, if you reduced your layout to a minimum..This is no small project anymore with 5+ layouts. That makes it hard to find what we need.

    A capx that is reduced to the events that are essential for your problem would be nice.

    Anyways,

    this is the solution:

    find this event:

    Change it to this:

    If you are interested why it didn't work before:

    You need a "For each". If you don't use it, the event will trigger for the first instance that meets the requirements and for that instance only.

    So if there is at least one enemy that is already below 1 health, it won't trigger for any other enemies that meet that requirement.

    You fix this by adding "For each".

    But since "For each" and "Trigger once" don't work well together, we will have to find a way to prevent blood from spawning over and over. Be do this by only triggering the event when the enemy isn't already playing the "Dead" animation, thus, not being dead already.

  • Thanks, I'll try to reduce the layout next time.

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