[Updated Request] Sys. Action - Destroy All Objects On Layer

0 favourites
  • 9 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • The Feature Request:

    I would like to request a system action with the purpose of destroying all objects on a selected layer.

    Practical Example Of Use:

    This action could make it possible to unload/destroy all objects on a certain layer by simply using one action.

    Developers could for example destroy certain parts of their layer-segmented "gameworld",

    without having to create many individual event-loops to destroy each type of object or object type family.

    Minor Technical Details:

    Plugin: System

    Type: Action

    Name: Destroy All Objects On Layer

    Category: Layers & Layout

    Basic Programming Logic: Get all objects on *layername* > Destroy all detected objects (including all instances)

    Additional Requirements: Requires a window with textbox-input for the user to add the name of the layer.

    @Ashley I would very much appreciate this feature or a short statement about this feature request.

    I could also provide more information or practical examples of use if required. Thanks for your time!

    Update:

    HERE is a plugin to do the thing mentioned in this request. Plugin made by one of our JS magicians that goes by the name of

    (C0 and everybody can feel free to use the code in one of their own plugins if they like to.)

  • That would be a useful feature but I don't think Ashley will implement it. The reason why is you can make a variable and when the variable is triggered true , it will destroy all the objects in the layer you want. If you want multiple events to trigger all the objects in the layer destroyed, you can make it into a function that way reducing your code.

  • A grouping like families, except for all world objects might be more feasible.

  • You both made your fairly "negative" points towards this request and that's alright but I don't want to get into any further arguments.

    I would really appreciate a more "official" approval or denial of this feature request, I'm sure you guys do understand.

  • You can easily implement this by using functions / families. But there is nothing wrong with having too many features. +1

    Still, even if it were to be implemented. This will likely be postponed for C3.

  • Yeah, I think it would be better if we could make families more usable so that you can say "Family is in layer -> Destroy" and have it do more or less the same thing. This way seems better since you can extend it to any conditions or actions, not just a special-case "destroy on layer" feature. But as with pretty much any feature suggestion at this point, it probably won't happen before C3.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, I think it would be better if we could make families more usable so that you can say "Family is in layer -> Destroy" and have it do more or less the same thing. This way seems better since you can extend it to any conditions or actions, not just a special-case "destroy on layer" feature. But as with pretty much any feature suggestion at this point, it probably won't happen before C3.

    Thanks for the lightning speed response.

    I just thought this this would be one of the "easier" features to implement compared to fully reworking plugins and so on, since the code for destroying and detecting objects on a layer should already be there (e.g. layer effects apply to all objects on a layer) but if you consider reworking whole engine side mechanics that's fine too.

    It's just that recently a discussion about "unloading" certain things came up again and destroying objects is kinda C2's only way to stop rendering objects AFAIK.

    Alrighty then, we're looking forward towards improvements that could make a process like this easier inside C3.

  • [quote:16qji9u6]destroying objects is kinda C2's only way to stop rendering objects AFAIK

    Not at all. Making them invisible will stop rendering them. So will having them out of the boundaries of your current screen.

    Blog article on rendering in C2

    Oldie but goldy.

  • Not at all. Making them invisible will stop rendering them. So will having them out of the boundaries of your current screen. ...

    I find this whole process a bit confusing to be honest.

    So what I get from the "Image memory" part is that everything on the current layout is loaded into memory,

    meaning that even if you would destroy or set X invisible to stop it from rendering, it's still consuming memory right?

    I'm used to systems were you could load parts of the gameworld into memory while releasing others.

    Not meaning to say that those kind of systems were perfect, they were mostly coming with micro stuttering on

    low end devices but still, I think that 2D games like mine with a lot of high-res sprites would profit from using a method like that.

    Anyway, HERE is a plugin to do the thing mentioned in this request. Plugin made by one of our JS magicians that goes by the name of

    (C0 and everybody can feel free to use the code in one of their own plugins if they like to.)

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