How do I destroy only one instead of destroying everything?

0 favourites
  • 7 posts
From the Asset Store
The ultimate voice pack filled with 1,536 files of .......wav and mp3 of individual numbers, letters, and words (that go
  • Hi all, I'm a beginner in construct 2 (and sorry for my English... it's my second language).

    I'm making a vertical scroller game.

    My problem is that I've created spawning platforms that spawns outside the layer (from below) and then they would exit from the top. I can't do the "destroy outside layout" behavior otherwise they would destroy before coming in the layout. So I though to do an invisible object at the top of the layout, that when it collides with the platforms, it would destroy them individually, but it destroys all of them. Any ideas of what I can do?

  • Platform:Y<0.......Destroy

  • Platform:Y<0.......Destroy

    Thank you so much!! that worked perfectly thank you again

  • Platform:Y<0.......Destroy

    Hello again, I was wandering if you would also know how to stop object from spawning? thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use a variable.

    Create a variable "count = 0"

    Spawn objects only if "count < 20"

    And increase count by 1 each time you spawn an object.

  • You can use a variable.

    Create a variable "count = 0"

    Spawn objects only if "count < 20"

    And increase count by 1 each time you spawn an object.

    Thank you!! you are my savior

  • I want to add that recycling the platforms would be better for performance if possible.

    Instead of destroying them, move them back to the top.

    Also, I take it they scroll down/up so be aware that these platforms won't always be the same distance apart, they get separated and can grow far apart at higher speeds. So plan ahead for some degree of error.

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