Create one sprite on top of another?

Get help using Construct 2

Post » Sun Oct 30, 2011 10:54 pm

I want to create an explosion when a laser overlaps an enemy. I can check for the overlap and destroy the laser and enemy but how do I create an explosion in the enemy's place?

I have multiples of the one object and I've tried the following but no explosion shows up:

B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Sun Oct 30, 2011 11:04 pm

I see the problem: you're setting it so that the EXPLOSION is spawning explosions. Generally, when spawning objects it's safest to use the System - Create object action. Set the coordinates to Spinna.X, Spinna.Y, and you should get what you're looking for.

Also, the line that says "On animation 'Explosion1.AnimationName' finished"... maybe I've just never seen that usage before, but I don't think that'll do what you want. Unless that's literally the name the of the animation.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sun Oct 30, 2011 11:22 pm

I did try Spinna.X and Spinna.Y but the explosions where no where near the particular Spinna I shot. As for 'Explosion1.AnimationName' I just got the name by choosing the explosion sprite and choosing the expression:

B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Sun Oct 30, 2011 11:26 pm

Perhaps you're spawning it on the wrong layer, then, if your layers have different parallax values. I can only offer blind guesses, unless you post your capx for us to look at.
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sun Oct 30, 2011 11:47 pm

B
72
S
25
G
9
Posts: 382
Reputation: 10,649

Post » Sun Oct 30, 2011 11:58 pm

I'm not sure exactly what I did differently from my previous suggestion, but I put that in and it works now. Reuploaded it for you:

http://db.tt/i3G5Ey7o

B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Mon Oct 31, 2011 12:57 am

I must have had the logic wrong, lol! That's exactly what I wanted Scully, very much appreciated.
B
72
S
25
G
9
Posts: 382
Reputation: 10,649


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul, TELLES0808 and 23 guests