Dealing with multiple groups of objects on the same layer

  • Here's my predicament and then the workaround I'm using. Let me know if you have a better one!

    I have a group of about 100 strategically placed, clickable sprite instances on a layer. They are all instances of the same object. I'll call this sprite1. I need to add a second set of 100 instances for a sprite2 object, with different placement. Only one set/object would be active at a given time in the app. Doing this all on the same layer would be a big mess in the editor if I wish to work with only one set of sprites. You can lock a layer but not an object.

    I'd like to do this all on the same layer because:

      - I have enough layers already
      • Adding a layer would change layer numbers for other layers and I'd have to scrub the events and adjust
      • I will probably need to add more objects/sets at a later time

    But the problem is managing it in all in the editor. My workaround is:

      1. Create a test layer called "------" as the top layer 2. If I want to edit sprite1, click sprite 2 in the editor (which highlights all instances) 3. Move sprite2instances to the ------ layer in object properties 4. Edit sprite1 instances as needed 5. Move sprite2 instances from the "------" back to the active layer

    Is this how you would do it?

    I'd really like to use the same object for all groups of instances but I'm not going to go there.

  • Are you sure you have enough layers already? haha. I don't see a problem with having each in their own layer which you lock and then move them to the correct layer on start of layout. I wouldn't deal with 200 objects in the editor though, I would find out what I wanted to do in game and make logic to create them during run time, but that's me.

  • heheh. Yeah, its a bit of a bugger to sort everything. It's for a clickable onscreen keyboard (sprites on top of a keyboard bitmap) and I need to add multiple keyboard types/layouts.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah you can just create those and set their position during run time.

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