Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_quote_battle_slither_b_Draw_0

(view raw script w/o annotations or w/e)
1
draw_set_font(fnt_dotumche)
2
draw_set_color(c_black)
3
draw_set_halign(fa_left)
4
draw_set_valign(fa_top)
5
var battle_enemy_name = global.battle_enemy_name
6
if (!instance_exists(obj_quote_bubble_battle))
7
    return;
8
var target_bubble = obj_quote_bubble_battle
9
if (spawner != noone && instance_exists(spawner))
10
    target_bubble = spawner
11
if (text_effect == "twitchy")
12
{
13
    if (battle_enemy_name == "frostermit know cone duo")
14
        scr_draw_text_effect_twitchy_quotebubble_battle
scr_draw_text_effect_twitchy_quotebubble_battle

function scr_draw_text_effect_twitchy_quotebubble_battle(argument0, argument1, argument2) //gml_Script_scr_draw_text_effect_twitchy_quotebubble_battle { var twitchy_text_probability = global.twitchy_text_probability var twitchy_text_intensity = global.twitchy_text_intensity 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) { twitchy_text_offset_x = 0 twitchy_text_offset_y = 0 twitchy_text_number = irandom_range(1, twitchy_text_probability) if (twitchy_text_number == twitchy_text_probability) { twitch_direction = irandom_range(1, 4) switch twitch_direction { case 1: twitchy_text_offset_x = 1 twitchy_text_offset_y = 0 break case 2: twitchy_text_offset_x = -1 twitchy_text_offset_y = 0 break case 3: twitchy_text_offset_x = 0 twitchy_text_offset_y = 1 break case 4: twitchy_text_offset_x = 0 twitchy_text_offset_y = -1 break } } 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))) if (string_lettersdigits(str_char) == "") draw_text((argument1 + str_offset), argument2, string_hash_to_newline(str_indent + str_char)) else draw_text((argument1 + str_offset + twitchy_text_offset_x * twitchy_text_intensity), (argument2 + twitchy_text_offset_y * twitchy_text_intensity), string_hash_to_newline(str_indent + str_char)) } }
(message[message_current], (target_bubble.x + 9), (target_bubble.y + 9))
15
    else
16
        scr_draw_text_effect_twitchy_quotebubble_battle
scr_draw_text_effect_twitchy_quotebubble_battle

function scr_draw_text_effect_twitchy_quotebubble_battle(argument0, argument1, argument2) //gml_Script_scr_draw_text_effect_twitchy_quotebubble_battle { var twitchy_text_probability = global.twitchy_text_probability var twitchy_text_intensity = global.twitchy_text_intensity 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) { twitchy_text_offset_x = 0 twitchy_text_offset_y = 0 twitchy_text_number = irandom_range(1, twitchy_text_probability) if (twitchy_text_number == twitchy_text_probability) { twitch_direction = irandom_range(1, 4) switch twitch_direction { case 1: twitchy_text_offset_x = 1 twitchy_text_offset_y = 0 break case 2: twitchy_text_offset_x = -1 twitchy_text_offset_y = 0 break case 3: twitchy_text_offset_x = 0 twitchy_text_offset_y = 1 break case 4: twitchy_text_offset_x = 0 twitchy_text_offset_y = -1 break } } 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))) if (string_lettersdigits(str_char) == "") draw_text((argument1 + str_offset), argument2, string_hash_to_newline(str_indent + str_char)) else draw_text((argument1 + str_offset + twitchy_text_offset_x * twitchy_text_intensity), (argument2 + twitchy_text_offset_y * twitchy_text_intensity), string_hash_to_newline(str_indent + str_char)) } }
(message[message_current], (target_bubble.x + 12), (target_bubble.y + 9))
17
}
18
else if (text_effect == "circle")
19
{
20
    if (battle_enemy_name == "frostermit know cone duo")
21
        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 }
(message[message_current], (target_bubble.x + 9), (target_bubble.y + 9))
22
    else
23
        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 }
(message[message_current], (target_bubble.x + 12), (target_bubble.y + 9))
24
}
25
if (color_count >= 1)
26
{
27
    if (text_effect_2 == "twitchy")
28
    {
29
        if (battle_enemy_name == "frostermit know cone duo")
30
            scr_draw_text_effect_twitchy_quotebubble_battle
scr_draw_text_effect_twitchy_quotebubble_battle

function scr_draw_text_effect_twitchy_quotebubble_battle(argument0, argument1, argument2) //gml_Script_scr_draw_text_effect_twitchy_quotebubble_battle { var twitchy_text_probability = global.twitchy_text_probability var twitchy_text_intensity = global.twitchy_text_intensity 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) { twitchy_text_offset_x = 0 twitchy_text_offset_y = 0 twitchy_text_number = irandom_range(1, twitchy_text_probability) if (twitchy_text_number == twitchy_text_probability) { twitch_direction = irandom_range(1, 4) switch twitch_direction { case 1: twitchy_text_offset_x = 1 twitchy_text_offset_y = 0 break case 2: twitchy_text_offset_x = -1 twitchy_text_offset_y = 0 break case 3: twitchy_text_offset_x = 0 twitchy_text_offset_y = 1 break case 4: twitchy_text_offset_x = 0 twitchy_text_offset_y = -1 break } } 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))) if (string_lettersdigits(str_char) == "") draw_text((argument1 + str_offset), argument2, string_hash_to_newline(str_indent + str_char)) else draw_text((argument1 + str_offset + twitchy_text_offset_x * twitchy_text_intensity), (argument2 + twitchy_text_offset_y * twitchy_text_intensity), string_hash_to_newline(str_indent + str_char)) } }
(message_2[message_current], (target_bubble.x + 9), (target_bubble.y + 9))
31
        else
32
            scr_draw_text_effect_twitchy_quotebubble_battle
scr_draw_text_effect_twitchy_quotebubble_battle

function scr_draw_text_effect_twitchy_quotebubble_battle(argument0, argument1, argument2) //gml_Script_scr_draw_text_effect_twitchy_quotebubble_battle { var twitchy_text_probability = global.twitchy_text_probability var twitchy_text_intensity = global.twitchy_text_intensity 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) { twitchy_text_offset_x = 0 twitchy_text_offset_y = 0 twitchy_text_number = irandom_range(1, twitchy_text_probability) if (twitchy_text_number == twitchy_text_probability) { twitch_direction = irandom_range(1, 4) switch twitch_direction { case 1: twitchy_text_offset_x = 1 twitchy_text_offset_y = 0 break case 2: twitchy_text_offset_x = -1 twitchy_text_offset_y = 0 break case 3: twitchy_text_offset_x = 0 twitchy_text_offset_y = 1 break case 4: twitchy_text_offset_x = 0 twitchy_text_offset_y = -1 break } } 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))) if (string_lettersdigits(str_char) == "") draw_text((argument1 + str_offset), argument2, string_hash_to_newline(str_indent + str_char)) else draw_text((argument1 + str_offset + twitchy_text_offset_x * twitchy_text_intensity), (argument2 + twitchy_text_offset_y * twitchy_text_intensity), string_hash_to_newline(str_indent + str_char)) } }
(message_2[message_current], (target_bubble.x + 12), (target_bubble.y + 9))
33
    }
34
    else if (text_effect_2 == "circle")
35
    {
36
        if (battle_enemy_name == "frostermit know cone duo")
37
            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 }
(message_2[message_current], (target_bubble.x + 9), (target_bubble.y + 9))
38
        else
39
            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 }
(message_2[message_current], (target_bubble.x + 12), (target_bubble.y + 9))
40
    }
41
}