Enemy destroyed animation

Get help using Construct 2

Post » Sat Aug 24, 2013 3:42 pm

whenever I destroy the enemy, I want it to change into a Destroyed animation, but It's not doing what I want it to do.

Here's the regular destroyed event:



And here's what I want it to do AFTER it's destroyed:



Any ideas what might be wrong?
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Sat Aug 24, 2013 3:45 pm

The problem is you've just destroyed the object! You can't keep using it. Just replace your destroy call with the animation call. Do a destroy when the "destroyed" animation ends.
ImageImageImage
B
71
S
22
G
258
Posts: 3,791
Reputation: 143,198

Post » Sat Aug 24, 2013 3:49 pm

Thanks! I really need to write this stuff down xD
B
10
S
4
G
1
Posts: 159
Reputation: 1,933

Post » Sat Aug 24, 2013 3:50 pm

It's wrong because "On destroyed" is opposite of "On created" to an object.

"On destroyed" is designed to modify values like adding scores or something else as special actions such as switch, level up, etc.


You should change "Enemy: Destroy" to "Enemy: Set destroyed animation" and create another event to create 2 conditions

-Enemy: On animation finished
-Enemy: Is playing "destroyed" animation
--enemy: destroyed


It could work
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Sat Aug 24, 2013 6:03 pm

or destroy the object
and spawn a explosion animation.
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Sat Sep 20, 2014 1:53 pm

@Joannesalfa you hellpe me a lot!

I make on colison / set animation and destroy but nothing... I try to fix with wait but colision can cast a couple times during wait period.

But now with this its works! Thank you!
B
6
S
1
Posts: 34
Reputation: 474

Post » Thu Aug 06, 2015 6:04 pm

the same problem thnx everyone!
B
6
S
2
Posts: 114
Reputation: 874


Return to How do I....?

Who is online

Users browsing this forum: RIDETHEPIG and 7 guests