• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Draw event not drawing my rectangle

T

Theghost

Guest
Hi guys,
I've encountered a problem where my rectangle doesn't show up on the screen. It is not my first time using the draw event but it is still not working. could you please help me for a second?
Code:
//create event
draw = false;
fade = 1;

//step event
if(collision_circle(x,y,50,obj_player,false,false) && keyboard_check(ord("E")))
{
    draw = true;
    fade -= 0.01 ;
    global.realisticTimerH = 7;
    global.realisticTimerM = 0;
    with(obj_timer_and_stamina_counter)
    {
        stamina = 160;   
    }
}

//draw event
if(draw == true)
{
    draw_set_color(c_white);
    draw_rectangle(0,0,1024,768,false);
}
 

TsukaYuriko

☄️
Forum Staff
Moderator
Is draw set to true? Does any other code run when put inside the body of that if statement in the Draw event?
Is the object marked as visible?
Is an instance of the object in the room?
Is a camera defined, active and visible?
Is anything else being drawn that may shadow this?
Is anything drawn at all?
 
T

Theghost

Guest
Is draw set to true? Does any other code run when put inside the body of that if statement in the Draw event?
Is the object marked as visible?
Is an instance of the object in the room?
Is a camera defined, active and visible?
Is anything else being drawn that may shadow this?
Is anything drawn at all?
yes
oh 💩💩💩💩, I'm stupid.
yes
yes
no
yes
 
Top