Attaching Character and Object which is on two different layers

Discussion in 'How Can I...?' started by apps, Sep 29, 2015.

  1. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    Referring to the game CIRCLE, on how to make the "front" of the circle in front of the line, and the "back" of the circle behind the line.

    I tried doing it by cutting the circle such that the top/front/bottom of the circle is the Character, and the back of the circle is an Decoration Object. The Character is the foremost layer (Bring To Front), and the Object is the 2nd backmost layer, just in front of the background. Then, I connected these two. It shows up correctly in the BB editor, however when the game is run, both the Char and Object are in front of the line.

    I guess that the layer of the object will follow that of the character (since the source of the connection is the character)?

    What should I do such that it achieves the above please?

    Else, is there a better way of doing this?
     
  2. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    Sorry if it sounded too confusing above. Essentially what i was trying to do is like in the game CIRCLE, i am trying to create a ring (the Character) around a line (the Enemy). However I am trying to layer the character such that a portion of the ring is in front of the line, and another portion of the ring be behind the line. To do that, I tried to create both a character for 3/4 of the ring, and an object for 1/4 of the ring, then layer the character above the line, and line above the object. Then I connected the character to the object so that they move together.

    They did move together when I run it, however both the character (3/4 of ring) and the object (1/4 of ring) are in front of the line.

    Any experts here know how I can achieve the needed effect please?
    Would appreciate much, thanks!
     
  3. Kamil Kucma

    Kamil Kucma Boxer

    Joined:
    Sep 25, 2015
    Messages:
    62
    Likes Received:
    41
    I think I get it but can you attach the screenshot or video? That will be much easier to understand;-)
     
  4. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    Yep picture says a thousand words I guess! This is what I wanted to achieve, and shown in the BB Editor:
    What I want.png

    However when I play it, it shows this instead:
    What resulted instead.png
     
  5. Kamil Kucma

    Kamil Kucma Boxer

    Joined:
    Sep 25, 2015
    Messages:
    62
    Likes Received:
    41
    Ok, now I get it. Linking objects will always move all its 'childs' to the 'parent' up/down position. You need to hack it somehow;-)
    I think I have a solution for you, it's a bit tricky but I just checked it and it works fine:

    [​IMG]

    Set logic to affect those multiplied cubes, and to remove them from the scene. But make sure that BB removes them or you will occur some kind of 'memory leak' after a long game session;-)
     
    stevinz and Jagabum like this.
  6. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    wow.... seems like pretty involved work though if we want to make this into a long game haha!

    can someone from buildbox help with the problem please, seeing that CIRCLE is made using buildbox? :)
     
  7. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Circle (by Ketchapp) is not a Buildbox game.
     
  8. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    oops sorry, I had the impression that Ketchapp is buildbox's brand name, my apologies.

    Andy, is there a way which this effect can be achieved using buildbox please?
     
  9. Andy

    Andy Miniboss Boxer

    Joined:
    Sep 24, 2015
    Messages:
    2,152
    Likes Received:
    1,546
    Did you try the method described by @Kamil Kucma ? I would start with that and go from there. I don't have any other specific information.
     
  10. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    Gonna try it now :)
    Is it possible for buildbox to allow the child and parent objects to stay in different layers even after connecting them, in a future upgrade perhaps? I can imagine a lot of possibilities popping up if we can do that
     
    Joshua Ross and Mr Goodcat like this.
  11. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    it works beautifully! thanks so much kamil! :)
     
    Kamil Kucma likes this.
  12. Kamil Kucma

    Kamil Kucma Boxer

    Joined:
    Sep 25, 2015
    Messages:
    62
    Likes Received:
    41
    You’re welcome, good luck! ;-)
     
    apps likes this.

Share This Page