Kinsures > Programming help > Novice Questions & Answers
Your Ad Here
Full Version: help
cody12
hey i know how to make a clock for a gamebut when i do it does not draw it on the screen i was wounderin if someone could make a example i can download because GM wont let me draw it on screen
Nintendo-pie
More information please. Where is the code? What does it say?


Most likely scenario, you've put it in the wrong event. Is it isn't the draw event, it probably should be.
tophunter7
I made a quick piece of code.

Put this into the draw event of an object and run the game.

QUOTE
draw_set_color(c_white);
draw_circle(room_width/2,room_height/2,22,false);
draw_set_color(c_red);
draw_line(room_width/2,room_height/2,room_width/2+lengthdir_x(12,90-current_second*6),room_height/2+lengthdir_y(12,90-current_second*6));
draw_set_color(c_blue);
draw_line(room_width/2,room_height/2,room_width/2+lengthdir_x(16,90-current_minute*6),room_height/2+lengthdir_y(16,90-current_minute*6));
draw_set_color(c_lime);
draw_line(room_width/2,room_height/2,room_width/2+lengthdir_x(20,90-current_hour*30),room_height/2+lengthdir_y(20,90-current_hour*30));
draw_set_color(c_black);
draw_circle(room_width/2,room_height/2,22,true);


Shouldn't be too hard to see how I did that. smile.gif

Any questions about it, don't hesitate to ask .... in this topic.

~TH7
Powered by IP.Board v1.3 © 2003 - iPBFree v.2.1 © 2007