Request: Destroy all sprites action

0 favourites
  • 10 posts
From the Asset Store
Shoot your way through with these 4 exciting, fun, energetic, and upbeat music tracks and 14 sound effects
  • I think it would be handy to have a "destroy all sprites/objects" action. This could be used before changing level because many times there will be a few sprites that remain on screen when changing level (for instance I usually see bullets continue flying across the screen after changing level.)

  • I second this idea.

  • When the layout is changed all objects that are not global are destroyed.

    if your bullets are not set to be global then I'd say its a bug that they are not destroyed on a layout change.

    The only point where I think it may be useful to destroy everything is at a layout change, but you can do that now by making all the objects not global.

  • I am assuming that your levels are on the same layout. A common practice is each level is a layout. As R0J0hound said, switching layouts destroys all non global objects...

  • I don't think I use global on anything. I guess it's a bug then, it seems like the persistance of sprites happens when they've been recently created before the layout change but I'm not sure. Seeing that I can't replicate or figure out why it happens that's why I suggest adding this destroy feature, since Ashley usually requires specific directions for encountering bugs.

  • The engine definitely does destroy all non-global objects when switching layout, so I would say the most likely cause is you accidentally made some objects global.

    Still, you can already do a 'destroy all objects' type event by putting a 'destroy' action under a 'pick all instances' event.

  • How does one control the scope of procedurally generated sprites? Do they adopt the properties of the pre-existing mandatory sprite?

  • I usually put all my destroyable object in a family and destroy that family on start of layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This would be useful for those dynamically loading levels via external files. You could use families but this would be a little easier I suppose.

  • The engine definitely does destroy all non-global objects when switching layout, so I would say the most likely cause is you accidentally made some objects global.

    Still, you can already do a 'destroy all objects' type event by putting a 'destroy' action under a 'pick all instances' event.

    I noticed it sometimes doesn't destroy particles already in flight, ie. one-shot spray and rarely, sprites with a short fade out. Not sure why but i never set global for any object.

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