Noob trouble with text string

V

vlaxep

Guest
Hi there,

Sorry for the noob question but I'm struggling to find an answer to this anywhere.

I have the following line of script setup in a room, but the Capital letters and periods/full stops do not appear and are seemingly ignored. Seems like there should be a simple solution but I can't find it.

scr_text("Once upon a time, there was a story and it went like this.... In a galaxy far far away",0.4,80,100);

It appears like the attached pic.

Thanks,

Vlaxep
 

Attachments

D

Dengar

Guest
show the script or where your parsing the string or we wont be able to help. but from the look of it your string parsing is messed up somewhere and removing caps and special characters. are u using string_letters? also that 0.4 argument seems suspicious
 
J

jackhigh24

Guest
you have not set any fonts up for capital letters and full stops and other things like that, where and how are you adding the font
 
V

vlaxep

Guest
Thanks for the replies!

The font is just added as a font object and referred to in the scripts. I have followed a tutorial to do this
so I don't fully understand how all of it works. And I noticed in the video that his line of text began with
a capital.

Here are the scripts being used:

These 2 are a 'Draw' event for obj_storytext

1.
///Add letters over time
if (time < text_length)
{
time += spd;
print = string_copy(text,0,time)
}


2.
///Render text box and text
draw_set_alpha(alpha);
if (alpha < 1) alpha += spd/10; else alpha = 1 ;

draw_set_font(font);
draw_set_color(c_black);
draw_set_halign(fa_left);
draw_set_valign(fa_top);

draw_text_ext
(
80,
100,
print,
font_size+(font_size/2),
320
);

draw_set_alpha(1);



This is under a 'Create' event.

///Create with 0Alpha at 0Time

alpha = 0;
print = "";
time = 0;
depth = depth - instance_number(obj_storytext);

Hopefully you can see a prob in there somewhere because I cant!!

Thanks
Vlax
 

Mercerenies

Member
My money is on the font itself. Where did you get the font you're using, and are you sure it's meant to be used with capital letters? This isn't something GM would do ordinarily. It's likely the font.
 
V

vlaxep

Guest
Hi Mercerenies,

I've tried multiple fonts with no luck. I'm just using the inbuilt 'font' option on the left hand side of screen, and using
the fonts that come with that, nothing imported. I've tried standards like Arial and TNR as well as others. The font
styles work when I run the game but the exact same problem, no Capitals and no dots.

Hmmm

Thanks anyways if no more ideas.
 

FrostyCat

Member
Did you include the right character ranges in the font resource? Open Font Properties and make sure 32 through 127 is included at the very least.
 
Top