1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Background Overlays / Depth

Discussion in 'Programming' started by NoFontNL, Aug 12, 2019.

  1. NoFontNL

    NoFontNL Member

    Joined:
    Feb 10, 2018
    Posts:
    305
    Is there a way to change the draw order of backgrounds?

    Thanks in advance.
     
  2. NoFontNL

    NoFontNL Member

    Joined:
    Feb 10, 2018
    Posts:
    305
    Side note, in the GameMaker room editor everything looks fine, but in game it does not
     
  3. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    212
    @NoFontNL changing the depth of the layer/background

    lowers numbers get drawn in the front
    and highers get draw in the back
     
  4. NoFontNL

    NoFontNL Member

    Joined:
    Feb 10, 2018
    Posts:
    305
    Hmm, then there might be another problem.
    You see, I've done this and it shows correctly in the room editor.
    But in game, the background[0] loops instead of being drawn only at the bottom.
    I have one background[0] which is not vertically tiled and it's y position is at the bottom of the room (so that it fits on screen)
    Then I have background[1] which is vertically tiled. But background[0] is on top of it, as it's supposed to, but it loops too
     
  5. pipebkOT

    pipebkOT Member

    Joined:
    Dec 13, 2018
    Posts:
    212
    if the problem is that it loops /tiled , change the layer settings in the room editor so it doesn't tile

    [​IMG]

    and in the sprite editor too

    [​IMG]
     
    Last edited: Aug 12, 2019
  6. NoFontNL

    NoFontNL Member

    Joined:
    Feb 10, 2018
    Posts:
    305
    I'm using GMS1.4
    So I changed the settings in the background, and the settings in the room and it still occurs.
     
  7. NoFontNL

    NoFontNL Member

    Joined:
    Feb 10, 2018
    Posts:
    305
    Also, when doing backgound_index[1] =-1 and also when doing background_visible[1]=false, then the background is still there.
     
  8. NoFontNL

    NoFontNL Member

    Joined:
    Feb 10, 2018
    Posts:
    305
    I found a workaround, it's not a fix to this problem however.
    I made a seperate object which draws the background.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice