destroy an object after being created....

0 favourites
  • 13 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • hello there..i love making projects with construct 2..it is so awesome :))

    but right now i have a little problem...

    i want to make an object disappear(destroy..ecc..)after i made it appear by clicking the left button of the mouse...

    so...

    left click-the object appear-after that disappear..

    (im making an action game so the object in question it's a muzzle flash attached to the image point of the gun :) )

    thank you for your help :)

    A.P.

  • Can you be more specific?

    add an image.

  • right now i cannot post images because i don't have enough reputation points... i try to explain a little better

    i click on the mouse= an object is created and then destroyed

    thanks for the help :)

  • Use the fade behavior on it.

  • You could also use an animation on the gun. First frame without flash. When you want the flash, just play the animation.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Alternatively, you can use "On animation finished" or "On frame changed" then destroy

  • You might not be seeing it if it's instant (in the same event).

    Try On Click, create object, system>wait 0.5 seconds>destroy object

    It should show up then. It would be better to do fading and such, but getting it to just work is most important.

  • You might not be seeing it if it's instant (in the same event).

    Try On Click, create object, system>wait 0.5 seconds>destroy object

    It should show up then. It would be better to do fading and such, but getting it to just work is most important.

    C-7 I would replace 0.5 with dt, it's better

  • thank you a lot guys ^^ now is working but..there is a new problem now...

    if i move the player and shoot, the muzzle flash will stay behind the player for a bit.. like:

    move constantly right--click on the mouse--the object appear BEHIND the player. i cannot post images so... sorry if im explaining it a little bad...

    again thanks a lot <img src="smileys/smiley17.gif" border="0" align="middle" />

  • the easiest way to fix this is to use different layers.

  • hi thank you for the fast reply XD can you explain this ''different layers'' thing?

  • It would be better if you looked at this Move to another Layer

  • ok so i need to put the object inside another layer?

    the tutorial is kinda confusing D:

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