Undertale script viewer

← back to main script listing

gml_Object_obj_6book_act_Draw_0

(view raw script w/o annotations or w/e)
1
if (type == 1)
2
    image_alpha -= 0.04;
3
if (image_alpha < 0.08)
4
    instance_destroy();
5
draw_sprite_ext(sprite_index, image_index, x, y, 1, 1, image_angle, c_white, image_alpha);
6
if (con == 999999)
7
{
8
    if (con > 0 && con < 3)
9
    {
10
        image_alpha -= 0.02;
11
        draw_set_color(c_black);
12
        ossafe_fill_rectangle(200, 150, 500, 240);
13
        draw_set_color(c_white);
14
        scr_setfont
scr_setfont

var newfont = argument0; if (global.language == "ja") { if (newfont == fnt_main) newfont = fnt_ja_main; if (newfont == fnt_maintext) newfont = fnt_ja_maintext; if (newfont == fnt_plain) newfont = fnt_ja_plain; } draw_set_font(newfont);
(fnt_maintext);
15
        draw_text_transformed(200, 180, 
You called for help...
scr_gettext
scr_gettext

var text_id = argument[0]; var text = ds_map_find_value(global.text_data_en, text_id); if (is_undefined(text)) text = ""; if (global.language == "ja") { var loc_text = ds_map_find_value(global.text_data_ja, text_id); if (!is_undefined(loc_text)) text = loc_text; } for (var i = 1; i <= (string_length(text) - 3); i++) { if (string_copy(text, i, 2) == "\[" && string_char_at(text, i + 3) == "]") { var sel = string_char_at(text, i + 2); var replace; if (sel == "C") replace = global.charname; else if (sel == "G") replace = string(global.gold); else if (sel == "I") replace = global.itemname[global.menucoord[1]]; else if (sel == "1" && argument_count > 1) replace = argument[1]; else if (sel == "2" && argument_count > 2) replace = argument[2]; else if (sel == "3" && argument_count > 3) replace = argument[3]; else if (sel == "4" && argument_count > 4) replace = argument[4]; else if (sel == "5" && argument_count > 5) replace = argument[5]; else if (sel == "6" && argument_count > 6) replace = argument[6]; else if (sel == "7" && argument_count > 7) replace = argument[7]; else if (sel == "8" && argument_count > 8) replace = argument[8]; else if (sel == "9" && argument_count > 9) replace = argument[9]; else replace = ""; var before = string_copy(text, 1, i - 1); var after = string_copy(text, i + 4, string_length(text)); text = before + replace + after; i += (string_length(replace) - 1); } } return text;
("obj_6book_act_179")
, 2, 2, 0);
16
    }
17
    if (con == 2)
18
    {
19
        type = 1;
20
        with (obj_6book_wordbullet)
21
            event_user(5);
22
        con = 2.1;
23
        alarm[4] = 50;
24
    }
25
    if (con == 3.1)
26
    {
27
        with (obj_6book_wordbullet)
28
            event_user(4);
29
        con = 3;
30
    }
31
}