@pipektOT
I'm still having problems with this.. Here is my code.
Character
Create Event:
friction=0.9
global.canmove=true
Step Event:
image_speed = speed/40
//this one works, but could be slower.
if speed=0 image_index = 0
Left Key Pressed:
global.canmove=true
if global.canmove=true
{
direction=180
sprite_index=spr_chara_left
speed=5
if(keyboard_check_pressed(vk_left)){
x=x-3
}
}
Text Box
Create Event:
///Some Variables
message[0] = "A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A "
message_current = 0 //0 is the first number in our list of messages
message_end = 0 //how many messages you want
message_draw = ""; //this is what we 'write' out.
increase = 0.5 //the speed at which new characters are added
characters = 0 //how many characters have been drawn
hold = 0 //if we hold 'Z', the text will render faster
message_length = string_length(message[message_current]) //get the number of characters
if obj_text1.visible = true{
global.canmove=false
}
Step Event:
if(place_meeting(x,y,Chara)){
if (characters < message_length) {
hold = keyboard_check(ord('z'))
characters += increase * (1 + hold)
message_draw = string_copy(message[message_current], 0, characters)
}
else{
if(keyboard_check_pressed(ord('z'))){
if(message_current < message_end){
message_current += 1
message_length = string_length(message[message_current])
characters = 0
message_draw = "";
}
}
}
}
Draw Event:
///Draws the sentence
draw_set_color(c_white)
draw_set_font(fnt)
if(place_meeting(x,y,Chara)){
global.speed = 0
draw_set_color(c_black);
draw_rectangle(32,512,992,736,0);
draw_set_color(c_white);
draw_rectangle(37,516,988,732,0);
draw_set_color(c_black);
draw_rectangle(43,522,982,726,0);
draw_set_color(c_white);
draw_text_ext(54,528,message_draw, 60,950)
}