Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Object is named "drawtext", no quotes. Script is called "drawtext_set".
- //Create Event:
- txt=''
- i=''
- p=0
- todraw=''
- pos=0
- secondarytext=''
- //Alarm 0:
- if secondarytext=''{
- todraw=''
- txt=''
- exit
- }
- if secondarytext!=''{
- script_execute(drawtext_set,secondarytext)
- secondarytext=''
- exit
- }
- //Step Event:
- if i!='.' and i!='!' and i!='?' and txt!=''{ //I did this the lazy way and had it check for punctuation.
- i=string_char_at(txt,pos)
- p=string_width(i)
- todraw=todraw+string(i)
- pos=pos+1
- sound_play(blip1)
- }
- if i='!' or i='.' or i='?'
- if alarm[0]=-1{
- if secondarytext='' alarm[0]=50
- else alarm[0]=20
- }
- //Draw Event:
- draw_set_font(font3) //This is the font I wanted to use. I was too lazy to name it.
- draw_set_color(c_white) //Whatever color you want.
- execute code:
- draw_set_halign(fa_left)
- draw_text(view_xview+10,view_yview+10,todraw)
- //Customize this a lot, until you are happy. This sets it to the top left corner.
- draw_set_halign(-1)
- ____________________________________________
- //Create Script named drawtext_set
- drawtext.txt=argument0
- drawtext.pos=0
- drawtext.todraw=''
- drawtext.i=string_char_at(drawtext.txt,1)
- drawtext.alarm[0]=-1
- //Create Script named drawtext_set2
- drawtext.txt=argument0
- drawtext.pos=0
- drawtext.todraw=''
- drawtext.i=string_char_at(drawtext.txt,1)
- drawtext.alarm[0]=-1
- drawtext.secondarytext=argument1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement