How do use anchor behavior to fix an object to the screen (window) ?

0 favourites
  • 3 posts
From the Asset Store
Get Ready for the New Wave of "Bottom Screen" Games!
  • Hello,

    How do use anchor behavior to fix an object to the screen (window) ?

    No matter how hard I try, I just can't get it to work. For example, how do I place a life bar that moves with the screen?

    I don't understand this behavior at all. oO

    I center the view in the middle of my scene because it is large. I put a text object with Anchor behavior. I start my scene, I don’t see my text which is gone.

    My scene has two layers, the 0 contains the text it is first, then the 1 which contains everything else, after the 0.

    If I set the parallax of the first to 0x0%, it changes nothing at all and my game no longer works as expected.

    If I put the text object in the top left of my scene, where the window’s dotted lines are, yes ok I see it (still layer 0 with parallax at 0x0%) but I no longer see my custom mouse cursor and no matter where I click to move my character, he will go to the top left of the scene, I don’t understand anything at all, this system is really bad I find, not at all practical.

    I just want to stick something on the screen and it moves according to the scrolling of the scene and that’s it!

    drive.google.com/file/d/1s_O3P6kPPAMofGRavQgyNxvFMSC8pbZQ/view

  • just put anchor enabled

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks but that's already done!

    In fact, it's not clear what they're doing, and it doesn't seem to be working the way I thought it would.

    Here is what I understood:

    Place the objects where you find the dotted lines, or where you find the window in the scene, because you can't change that.

    The objects must be in the dotted area, otherwise it doesn't work!

    I thought it was a behavior where objects would be stuck to the screen, but it's not that simple, I'm having trouble understanding how it works, plus, yes, objects will stay in the area dotted but that's all, if you resize the window and the objects are at the bottom, bottom right, right, top right, of the window, and you resize the window smaller, they will disappear, in fact they just obey this law of the dotted lines of the window.

    I wanted my objects to remain stuck to the window and for it to move depending on its size, so here, I have to put my objects at the top left of the window to be sure to see them, otherwise I have to set the window to maximum size.

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