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

Objects are turning invisible

Discussion in 'Programming' started by GiraffeKey, Feb 27, 2018.

  1. GiraffeKey

    GiraffeKey Member

    Joined:
    Feb 27, 2018
    Posts:
    5
    I am not using the draw event nor have I unchecked the visibility. Neither the player nor the enemies are visible, but their bullets are. I can shoot with and move the player, but his sprite no longer renders.
     
  2. TheouAegis

    TheouAegis Member

    Joined:
    Jul 3, 2016
    Posts:
    7,148
    Did you set image_xscale or image_yscale to 0?
     
  3. Gillen82

    Gillen82 Member

    Joined:
    Jan 30, 2017
    Posts:
    199
    Can you paste the code?
     
  4. GiraffeKey

    GiraffeKey Member

    Joined:
    Feb 27, 2018
    Posts:
    5
    Both the xscale and yscale are set to 2. Now that I think about it though, it is only objects that I scaled that won't appear. I'll have to review the code later.
     
  5. GiraffeKey

    GiraffeKey Member

    Joined:
    Feb 27, 2018
    Posts:
    5
    Oh. Figured it out. I said:
    Code:
    image_xscale = image_yscale = 2;
    But that doesn't work in this language, it worked when I changed it to:
    Code:
    image_xscale = 2;
    image_yscale = 2;
     
  6. JFitch

    JFitch Member

    Joined:
    Sep 28, 2016
    Posts:
    428
    I think Game Maker interprets the code like this
    Code:
    image_xscale = (image_yscale == 2);
     

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