GMS 2 Draw Begin does not work

Discussion in 'Programming' started by AlexMdle, Jul 6, 2018.

  1. AlexMdle

    AlexMdle Member

    Joined:
    Mar 9, 2018
    Posts:
    13
    I'd like to preface this thread by stating that I have checked thoroughly, down to changing the room background color to see if there is any overlapping issues. I can rule that out.

    Draw Begin event simply does not draw. It executes any debug code I put in there, but draw code does not seem to execute. I do not know what could be causing this.
     
  2. Relic

    Relic Member

    Joined:
    Jun 27, 2017
    Posts:
    747
    Dang. Check the usual suspects of what the alpha setting is, what the image_alpha is, whether the visibility is true
     
  3. AlexMdle

    AlexMdle Member

    Joined:
    Mar 9, 2018
    Posts:
    13
    I've already checked all of those.
     
  4. chamaeleon

    chamaeleon Member

    Joined:
    Jun 21, 2016
    Posts:
    1,079
    @AlexMdle Operating system, GMS version, export target, and code snippets might help..
     
  5. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    7,077
    samspade likes this.
  6. AlexMdle

    AlexMdle Member

    Joined:
    Mar 9, 2018
    Posts:
    13
    Background layer seems like a very likely culprit. How do I go about it?

    Edit: Mind, all drawing in the game is done using draw functions. I dont think backgrounds are used at all.
     
  7. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    2,197
  8. AlexMdle

    AlexMdle Member

    Joined:
    Mar 9, 2018
    Posts:
    13
    Alright, found out that disabling both backgrounds in the room editor shows the draw begin sprites. Now I just need some way to draw background color without using background. This wasn't an issue in GMS 1.4, is there a way to replicate it in GMS2?
     
  9. samspade

    samspade Member

    Joined:
    Feb 26, 2017
    Posts:
    2,197
    It probably depends upon what you are trying to accomplish by having the sprites draw at sprite begin. What's the end goal?
     
  10. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    7,077
    Have a layer under everything else in the room and place a controller instance in that layer. Then use the draw begin event of the controller object to draw a rectangle over the room...
     
  11. AlexMdle

    AlexMdle Member

    Joined:
    Mar 9, 2018
    Posts:
    13
    That sadly feels like the most feasible solution.
     

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