How do I make my enemy explode?

Get help using Construct 2

Post » Tue Mar 31, 2015 9:37 pm

I don't think "On enemy destroyed" > "Start fade" will work anyway, as the enemy is destroyed as the trigger so it no longer exists (correct me if I'm wrong, never used the fade function)

The explosion method should work just fine though - I'm not sure why it wouldn't, what you're trying to do is pretty simple. I'd upload a .capx, but I use a bunch of plugins you probably don't have, so that could be problematic. Could you show (or write out) exactly the events you're using? It should go something like:

[Enemy.Health] = 0
> [Enemy] Destroy

[Enemy] On destroyed
> [Enemy] Spawn object [Explosion]

[Explosion] On any animation finished
> [Explosion] Destroy
B
15
S
4
G
1
Posts: 286
Reputation: 1,988

Post » Wed Apr 01, 2015 10:10 am

On start of layout set fade active = no
player bullet hit enemy
enemy start fade
destroy player bullets
B
255
S
39
G
15
Posts: 1,982
Reputation: 41,005


Post » Wed Apr 01, 2015 11:03 am

Thanks I will give it a try later.
B
10
S
3
Posts: 109
Reputation: 1,080


Post » Wed Apr 01, 2015 3:09 pm

Ok so somewhere in between this code I want to make the enemy explode or fade? I still can not figure out why it is not doing it.


-> Bullet on collision with Enemy subtract 5 from (instancevarible) health

bullet -> destroy


Enemy Health < 0 enemy destroy



< = is actually less than or equal to but don't know keyboard symbol
B
10
S
3
Posts: 109
Reputation: 1,080

Post » Wed Apr 01, 2015 6:36 pm

Figured it out changed: Enemy Health < 0 enemy destroy

to

Enemy Health < 0 enemy start fadeout

in the properties of fadeout I set active at start to no

and

Destroy to After fade out
B
10
S
3
Posts: 109
Reputation: 1,080

Post » Wed Apr 01, 2015 7:42 pm

SomeT I have made this demo especially for you so you can understand. Download it from here it's call 1 SomeT for you

https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0
B
255
S
39
G
15
Posts: 1,982
Reputation: 41,005

Post » Wed Apr 01, 2015 7:46 pm

thanks but I figured it out now.
B
10
S
3
Posts: 109
Reputation: 1,080

Post » Wed Apr 01, 2015 7:50 pm

Good for you SomeT that is the way to learn. Don't give up
B
255
S
39
G
15
Posts: 1,982
Reputation: 41,005

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests