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

Drag And Drop Drawing a value on an object makes the object invisible

Discussion in 'Programming' started by Riley Nassour, Feb 27, 2018.

  1. so i have a ball that appears when "L" is held down and a value is drawn on it. when i press "L" it only shows the value and not the ball. In the code for the ball i have a draw event, and for the x coordinate i typed "x" and the y coordinate i typed "y". how to i make the ball visible with the text on top of it.
     
  2. Noba

    Noba Member

    Joined:
    May 6, 2017
    Posts:
    367
    Not sure, but try putting draw_self(); in the draw event.
     
  3. JFitch

    JFitch Member

    Joined:
    Sep 28, 2016
    Posts:
    428
    Noba is correct. The default if there is no draw event is draw_self(). But if you put code in the draw event, the assumption is that you want that to replace the default, so you have to specifically call draw_self().

    But make sure you call draw_self() first, otherwise the text will be under the object and you won't see it.
     

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