Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if talking_1=true
- {
- obj_player.stop=true;
- global.talk=true;
- var currentletter_1;
- txtlength_1=string_length(txt_1);
- repeat(txtspeed_1)
- {
- if (txtcount_1<txtlength_1)
- {
- scr_sound("text");
- txtcount_1+=1;
- currentletter_1=string_char_at(txt_1,floor(txtcount_1));
- displaytxt_1=displaytxt_1+string(currentletter_1);
- }
- else
- {
- if keyboard_check_pressed(ord("X"))
- {
- global.talk=false;
- talking_1=false;
- obj_player.stop=false;
- txtcount_1=0;
- txtlength_1=0;
- displaytxt_1="";
- txtspeed_1=1;
- }
- }
- }
- }
- if talking_2=true
- {
- obj_player.stop=true;
- global.talk=true;
- var currentletter_2;
- txtlength_2=string_length(txt_2);
- repeat(txtspeed_2)
- {
- if (txtcount_2<txtlength_2)
- {
- scr_sound("text");
- txtcount_2+=1;
- currentletter_2=string_char_at(txt_2,floor(txtcount_2));
- displaytxt_2=displaytxt_2+string(currentletter_2);
- }
- else
- {
- if keyboard_check_pressed(ord("X"))
- {
- global.talk=false;
- talking_2=false;
- obj_player.stop=false;
- txtcount_2=0;
- txtlength_2=0;
- displaytxt_2="";
- txtspeed_2=1;
- }
- }
- }
- }
- if talking_3=true
- {
- obj_player.stop=true;
- global.talk=true;
- var currentletter_3;
- txtlength_3=string_length(txt_3);
- repeat(txtspeed_3)
- {
- if (txtcount_3<txtlength_3)
- {
- scr_sound("text");
- txtcount_3+=1;
- currentletter_3=string_char_at(txt_3,floor(txtcount_3));
- displaytxt_3=displaytxt_3+string(currentletter_3);
- }
- else
- {
- if keyboard_check_pressed(ord("X"))
- {
- global.talk=false;
- talking_3=false;
- obj_player.stop=false;
- txtcount_3=0;
- txtlength_3=0;
- displaytxt_3="";
- txtspeed_3=1;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement