C
Cossie
Guest
Hiya! <3
Still bit new to game maker, little slow.
Followed Shaun Spaldings platformer video on Signposts.
Everything is working just as it should. I'm using the string variable trick to make it easier to change later on.
The only question I have is I am unsure how to make multiple pages of dialogue/text appear using his system. How can I change his code for longer dialogue/multiple pages?
Text Object Code:
Create Event:
Step Event:
Draw Event:
Still bit new to game maker, little slow.
Followed Shaun Spaldings platformer video on Signposts.
Everything is working just as it should. I'm using the string variable trick to make it easier to change later on.
The only question I have is I am unsure how to make multiple pages of dialogue/text appear using his system. How can I change his code for longer dialogue/multiple pages?
Text Object Code:
Create Event:
Code:
spd = 0.25;
letters = 0;
text = "test string!";
length = string_length(text);
text_current = "";
w = 0;
h = 0;
border = 10;
Code:
letters += spd;
text_current = string_copy(text,1,floor(letters));
draw_set_font(fText);
if (h == 0) h = string_height(text);
w = string_width(text_current);
//Destroy when done
if (letters >= length) && (keyboard_check_pressed(vk_anykey))
{
instance_destroy();
with (oCamera) follow = oHannah;
}
Draw Event:
Code:
var halfw = w * 0.5;
//Draw The Box
draw_set_colour(c_black);
draw_set_alpha(0.5);
draw_roundrect_ext(x-halfw-border,y-h-(border*2),x+halfw+border,y,15,15,false);
draw_sprite(sMarker,0,x,y);
draw_set_alpha(1);
//Draw text
DrawSetText(c_white, fText, fa_center, fa_top);
draw_text(x,y-h-border,text_current);