Undertale script viewer

← back to main script listing

gml_Object_obj_signspider_Draw_0

(view raw script w/o annotations or w/e)
1
draw_sprite_ext(sprite_index, image_index, x, y, 2, 2, 0, c_white, 1);
2
if (con == 1)
3
{
4
    image_index = 1;
5
    image_speed = 0;
6
    draw_sprite_ext(spr_tinyspider_sign, signimg, x, y, 2, 2, 0, c_white, 1);
7
    if (signimg >= 4)
8
    {
9
        draw_set_color(c_white);
10
        if (global.language == "ja")
11
            draw_set_font(fnt_ja_plainsmall);
12
        else
13
            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);
14
        scr_drawtext_centered
scr_drawtext_centered

var xx = argument0; var yy = argument1; var text = argument2; scr_drawtext_centered_scaled(xx, yy, text, 1, 1);
(x, y - 100,
Up Next
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_signspider_100")
);
15
        if (signno == 0 || signno == 1 || signno == 6 || signno == 10)
16
            draw_sprite(spr_spiderbullet1, 0, x, y - 70);
17
        if (signno == 8)
18
            draw_sprite(spr_croissantl, 0, x, y - 70);
19
        if (signno == 12)
20
        {
21
            draw_sprite(spr_croissantl, 0, x - 15, y - 70);
22
            draw_sprite(spr_croissantl, 0, x + 5, y - 70);
23
        }
24
        if (signno == 2 || signno == 13)
25
        {
26
            draw_sprite(spr_spiderbullet1, 0, x - 15, y - 70);
27
            draw_sprite(spr_spiderbullet1, 0, x + 15, y - 70);
28
        }
29
        if (signno == 11)
30
        {
31
            draw_sprite(spr_donutbullet, 0, x - 15, y - 70);
32
            draw_sprite(spr_donutbullet, 0, x + 15, y - 70);
33
        }
34
        if (signno == 3 || signno == 5 || signno == 7)
35
        {
36
            draw_sprite(spr_spiderbullet1, 0, x - 15, y - 70);
37
            draw_sprite(spr_donutbullet, 0, x + 5, y - 70);
38
        }
39
        if (signno == 4 || signno == 9 || signno == 15)
40
            draw_sprite(spr_cupcakebullet, 0, x, y - 70);
41
        if (signno == 14)
42
        {
43
            draw_sprite(spr_spiderbullet1, 0, x - 25, y - 70);
44
            draw_sprite(spr_donutbullet, 0, x, y - 70);
45
            draw_sprite(spr_croissantl, 0, x + 25, y - 70);
46
        }
47
    }
48
    if (signimg < 4)
49
        signimg += 0.5;
50
}
51
buffer -= 1;
52
if (global.myfight > 0 || global.mnfight > 0)
53
{
54
    if (con < 2 && buffer < 1)
55
        con = 2;
56
}
57
if (con == 2)
58
{
59
    signimg -= 0.5;
60
    draw_sprite_ext(spr_tinyspider_sign, signimg, x, y, 2, 2, 0, c_white, 1);
61
    if (signimg < 1)
62
        con = 3;
63
}
64
if (con == 3)
65
{
66
    image_speed = 0.5;
67
    if (hspeed < 10)
68
        hspeed += 1;
69
    if (x > 650)
70
        instance_destroy();
71
}