How do I fix this enemy animation error?

Get help using Construct 2

Post » Tue Dec 13, 2016 7:02 pm

Message: Vodakman can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?

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:
Posts: 34
Reputation: 345

Post » Tue Dec 13, 2016 9:37 pm

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.

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.
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
Posts: 528
Reputation: 7,091

Post » Wed Dec 14, 2016 3:54 pm

Thanks, I'll try to reduce the layout next time.
Posts: 34
Reputation: 345

Return to How do I....?

Who is online

Users browsing this forum: David181 and 17 guests