Windows Assets not visible

Discussion in 'GameMaker Studio 2 Community Tech Support' started by samyak, Jan 11, 2019.

  1. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
  2. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    6,342
    Do you have anything in the draw event of the objects? Could the objects be deactivated? Have you cleared the compiler cache and tested again?
     
  3. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    Your drawing text in the draw event. Add draw_self() to them and it should work
     
  4. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    They aren't deactivated, as they are working fine, except that they aren't visible. Texts are visible. I have used 'draw_self();' in the draw event. I have used the 'clean' tool, but that did not work. Only once, when I had saved the project in another name, it worked. But later the same problem appeared again. Now even this trick does not work
     
  5. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    I would delete the draw event from all the vehicles, add the draw text to your parent object and the draw self to the parent object
     
  6. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    The child object draw events are overriding the parent object draw event. Each one has its own draw text without a draw self
     
  7. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    I used 'draw_self() ' in all vehicles in another copy of this project, still it did not work
     
  8. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    Even the Asset layer did not work initially. The asset layer had some sprites
     
  9. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    I got a version working. Do you have discord? I can send it to an email or something also if you like
     
  10. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    yes , have discord
     
  11. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    Name? I can send it over discord if you give me your username
     
  12. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    Name: Esesem ssm

    Btw, what did u change?
     
  13. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    I also need your 4 digit tag. I added the v = choose function to your step event, this fixes it so that not all cars are the same. I deleted all of the child object draw events. I added your text draw event to the parent object and added the draw_self function below that.
     
  14. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    yes, that v variable was written there by mistake. I have no problem with that.

    But why does not the draw events act in child objects?
     
  15. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    4 digit tag= 4376
     
  16. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    Your using roughly the same code in all of them. If you want a slightly different position for the text you can set an offset in the create event of the vehicles themselves. It cleans up the code, makes it more efficient.
     
  17. The Video Gamester

    The Video Gamester Member

    Joined:
    Dec 2, 2016
    Posts:
    61
    I sent a discord friend request. It won't let me send gamemaker files unless you are on my list. Its a pain.
     
  18. samyak

    samyak Member

    Joined:
    Jul 19, 2016
    Posts:
    90
    thanks.
    Also I noticed that erasing the draw_self() function in child object makes the child object disappear, although the draw_self() function is present in the parent object's draw event.

    Also I still did not get this- When I first started this project my asset layer was invisible, I had made the 'visibility eye' ON in the layer's window in the room editing place. There were only a few sprites in those layer. The layer was above the background. Later this problem disappeared. I guess it was a compiler error or something like that.
     
  19. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    1,931
    If your child also has a draw event, this takes over from the parent draw event and the parent draw event will NOT run.

    If you have a child with a draw event and you also want the parent draw event to run, you must put the function event_inherited() in the code for your child object draw event.

    event_inherited() tells the child object to run the parent event as well as the child object event
     

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