• 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!

[SOLVED]Text GUI

Hi

I'm trying to print some text out in DrawGUI event and it isn't show anything.

Code:
draw_self();
draw_set_font(TitleScreenFont);
draw_text_ext_transformed_color(10,10, "Completed levels: " +
                                            string(global.completed_level1) + "first:" +
                                            string(global.completed_level2) + "second:" +
                                            string(global.completed_level3) + "third:" +
                                            string(global.completed_level4) + "fourth:" +
                                            string(global.completed_level5) + "fifth:" +
                                            string(global.completed_level6) + "sixth:" +
                                            string(global.completed_level7) + "seventh:" +
                                            string(global.completed_level8) + "eighth:" +
                                            string(global.completed_level9) + "ninth:" +
                                            string(global.completed_level0) + "tenth:" +
                                            string(global.completed_level1) + "eleventh:",
                                            30,300,10,10,0,c_red, c_red, c_red, c_red, 1.0);
Am I doing this right?
 

Rob

Member
To me it looks like you have 13 arguments when it takes 11, which should give you an error, so is the object in the room?

Code:
draw_text_transformed_colour(x, y, string, xscale, yscale, angle, c1, c2, c3, c4, alpha);

x: 10
y: 10
string:
"Completed levels: " +
                                           string(global.completed_level1) + "first:" +
                                           string(global.completed_level2) + "second:" +
                                           string(global.completed_level3) + "third:" +
                                           string(global.completed_level4) + "fourth:" +
                                           string(global.completed_level5) + "fifth:" +
                                           string(global.completed_level6) + "sixth:" +
                                           string(global.completed_level7) + "seventh:" +
                                           string(global.completed_level8) + "eighth:" +
                                           string(global.completed_level9) + "ninth:" +
                                           string(global.completed_level0) + "tenth:" +
                                           string(global.completed_level1) + "eleventh:"
xscale: 30
yscale: 300
angle:10
c1:10
c2:0
c3:c_red
c4:c_red
alpha: c_red
Here's an example from the manual:

Code:
draw_set_halign(fa_center);
draw_set_valign(fa_middle);
image_angle += 1;
draw_text_transformed_colour(room_width / 2, room_height / 2, keyboard_string, 2, 2, image_angle, c_red, c_red, c_yellow, c_yellow, 0.5);
 
Sorry but the function takes 13 arguments. draw_text_ext_transformed_color. not draw_text_transformed_colour. no dice.

(edit)

Yes the object doing the drawing is in a room. I tried it in a blank room and in the room where its going to be used
 

Rob

Member
Sorry but the function takes 13 arguments. draw_text_ext_transformed_color. not draw_text_transformed_colour. no dice.

(edit)

Yes the object doing the drawing is in a room. I tried it in a blank room and in the room where its going to be used
You're right - I clicked on the wrong link when I was checking. I don't know what else to suggest apart from copy/paste the code that's in the manual and if that works, go from there.
 
Top