Destroy Object

0 favourites
  • 3 posts
From the Asset Store
112 High-Quality destruction sounds for videogames
  • Hi I set an object to be destroyed on collision then for another object to spawn, but when the object spawns when it is collided against it dosnt destroy here the link

    Thank you

  • The capx you give is not very clear.

    When sprite 3 (black circle) collides with sprite 5 (red circle), the red circle is destroyed, the right arrow sprite4 is destroyed. (event 6)

    Each time (every tick) the sprite3.x is inferior to 444, it spawns a right arrow. (event 7)

    Also, every tick the text is visible, it spawns a red circle. (event 8)

    So it spawns a lot of right arrows for nothing, as well as red circles.

    You should rather than spawn and destroy simply make objects invisible, and test their visibility state when an action is supposed to happen.

    Ex: event 5 add another condition "Sprite4 is visible".

    This way, the action will only occur when the sprite is visible.

    This way you don't need to delete it or spawn it again, simply set it to visible or invisible.

    You might want to check out how events work again, it might help you out.

    Restructuring your code should help to solve your issue.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah yh thanks :)

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