Create one sprite on top of another?

0 favourites
  • 7 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • 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:

    <img src="http://img832.imageshack.us/img832/7491/clipboard01fh.png" border="0" />

  • 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. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • 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:

    <img src="http://img528.imageshack.us/img528/3790/clipboard01w.png" border="0" />

  • 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. <img src="smileys/smiley5.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not sure exactly what I did differently from my previous suggestion, but I put that in and it works now. <img src="smileys/smiley17.gif" border="0" align="middle" /> Reuploaded it for you:

    db.tt/i3G5Ey7o

  • I must have had the logic wrong, lol! That's exactly what I wanted Scully, very much appreciated. <img src="smileys/smiley20.gif" border="0" align="middle" />

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