E
EdTheDog
Guest
Hello! I am trying to make a program that draws pixel by pixel but for some reason, I can't change the color?
Here is the code:
It starts out drawing black pixels just fine but when I press R it doesn't draw pixels anymore. As a test, a draw an O in the center of the room and that changes to red just fine. Any help is appreciated!
Here is the code:
Code:
DRAW:
draw_self()
draw_text(room_width/2,room_height/2,"O")
if(global.drawdot = true and global.penon = true)
{
surface_set_target(surface);
draw_set_color(color)
draw_point(x,y)
surface_reset_target();
global.drawdot = false
}
CREATE:
color = c_black
global.drawdot = true
global.penon = true
surface = surface_create(room_width,room_height)
STEP:
if(keyboard_check(ord('R')))
{
color = c_red
global.drawdot = true
}
Last edited by a moderator: