Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_draw_text_effect_circle_quotebubble_battle

(view raw script w/o annotations or w/e)
1
function scr_draw_text_effect_circle_quotebubble_battle
scr_draw_text_effect_circle_quotebubble_battle

function scr_draw_text_effect_circle_quotebubble_battle(argument0, argument1, argument2) //gml_Script_scr_draw_text_effect_circle_quotebubble_battle { var circle_text_angle_increase = 0 var circle_text_radius = global.circle_text_radius var circle_text_speed = global.circle_text_speed str_indent = "" str_indent_count = 0 str_offset = (-(string_width(string_hash_to_newline(string_copy("A", 1, 1))))) for (var i = 1; i <= characters; i += 1) { str_char = string_char_at(argument0, i) if (str_char == "#") { str_indent_count += 1 if (str_indent_count == 1) str_indent = "#" else if (str_indent_count == 2) str_indent = "##" else if (str_indent_count == 3) str_indent = "###" else if (str_indent_count == 4) str_indent = "####" str_offset = (-(string_width(string_hash_to_newline(string_copy("A", 1, 1))))) * 2 } str_offset += string_width(string_hash_to_newline(string_copy("A", 1, 1))) draw_text((argument1 + str_offset + circle_text_radius * (cos((circle_text_angle + circle_text_angle_increase) * circle_text_angle_direction * 0.008726646259971648))), (argument2 - circle_text_radius * (sin((circle_text_angle + circle_text_angle_increase) * circle_text_angle_direction * 0.008726646259971648))), string_hash_to_newline(str_indent + str_char)) circle_text_angle_increase += circle_text_speed } circle_text_angle += circle_text_speed }
(argument0, argument1, argument2) //gml_Script_scr_draw_text_effect_circle_quotebubble_battle
2
{
3
    var circle_text_angle_increase = 0
4
    var circle_text_radius = global.circle_text_radius
5
    var circle_text_speed = global.circle_text_speed
6
    str_indent = ""
7
    str_indent_count = 0
8
    str_offset = (-(string_width(string_hash_to_newline(string_copy("A", 1, 1)))))
9
    for (var i = 1; i <= characters; i += 1)
10
    {
11
        str_char = string_char_at(argument0, i)
12
        if (str_char == "#")
13
        {
14
            str_indent_count += 1
15
            if (str_indent_count == 1)
16
                str_indent = "#"
17
            else if (str_indent_count == 2)
18
                str_indent = "##"
19
            else if (str_indent_count == 3)
20
                str_indent = "###"
21
            else if (str_indent_count == 4)
22
                str_indent = "####"
23
            str_offset = (-(string_width(string_hash_to_newline(string_copy("A", 1, 1))))) * 2
24
        }
25
        str_offset += string_width(string_hash_to_newline(string_copy("A", 1, 1)))
26
        draw_text((argument1 + str_offset + circle_text_radius * (cos((circle_text_angle + circle_text_angle_increase) * circle_text_angle_direction * 0.008726646259971648))), (argument2 - circle_text_radius * (sin((circle_text_angle + circle_text_angle_increase) * circle_text_angle_direction * 0.008726646259971648))), string_hash_to_newline(str_indent + str_char))
27
        circle_text_angle_increase += circle_text_speed
28
    }
29
    circle_text_angle += circle_text_speed
30
}