Muzzle flash [SOLVED]

This forum is currently in read-only mode.
From the Asset Store
A collection of 10 amazing sprite sheet animations for your incredible games
  • Hello!

    I recently dug up Construct because the urge to create a top-down zombie game that would be better than Zombie Horde 3 was too much for me to bear.

    I quickly ran into a problem tough... how do you create decent muzzle-flash? Currently I have a animated (2 frames) sprite, which I create together with each bullet fired from the player-sprite. But how do I delete the sprite afterwards, because at the moment it just stays there indefinitely... I tried to destroy it after the animation has ended, but that didn't impress it a bit.

    I'm sort of stuck here, any help ... please?

    Best regards,

    Noel

  • Is the sprite's animation set to loop? If it is, the animation won't "end", so to speak, so the way you set it up right now it'll never destroy itself. Sooo, try unchecking "Loop"

  • If your still stuck, you can use these-

    http://dl.dropbox.com/u/22173473/muzzle.rar

    <img src="http://dl.dropbox.com/u/22173473/muzzlepic.png">

    It contains 3 PNG images with transparency and instructions.

    I made them for a shooting game i am working on.

    I used these events -

    Line 7 + MouseKeyboard: On Left mouse button Clicked

    -> System: Create object muzzleflash on layer 2 at (gun.X-6, gun.Y-20)

    Line 8 + muzzleflash: Any animation finished

    -> muzzleflash: Destroy

    The animation settings were -

    Animation speed 50

    Loop OFF

    Repeat # 2

    Repeat to 1

    Ping-pong OFF

    if you want to download the game cap (you can copy them out of the cap) go here-

    http://www.scirra.com/forum/viewtopic.php?f=4&t=8778#p67345

    Feel free to use them if they want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks, SullyTheStrange... that was a perfect guess. I forgot to set the animation not be looped. That easy. Works perfect now.

    Thanks also chrisbrobs, very good to see that I was doing it right, basically (comparing with your event-list). I want to create all FX and visuals myself though...

    Best regards,

    Noel

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