Undertale script viewer

← back to main script listing

gml_Object_obj_undynetrigger_dry_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 1)
2
{
3
    instance_create(0, 0, obj_musfadeout);
4
    undyne = instance_create(-40, 60, obj_undynea_actor);
5
    undyne.rsprite = spr_undyne_helmet_r;
6
    undyne.dsprite = spr_undyne_helmet_d;
7
    undyne.lsprite = spr_undyne_helmet_l;
8
    undyne.usprite = spr_undyne_helmet_u;
9
    undyne.sprite_index = undyne.rsprite;
10
    undyne.hspeed = 1;
11
    undyne.image_speed = 0.1;
12
    con = 2;
13
    alarm[4] = 20;
14
}
15
if (con == 3)
16
{
17
    undyne.hspeed = 0;
18
    undyne.image_index = 0;
19
    undyne.image_speed = 0;
20
    con = 4;
21
    alarm[4] = 40;
22
}
23
if (con == 5)
24
{
25
    walked += 1;
26
    if (walked < 3)
27
    {
28
        con = 2;
29
        alarm[4] = 20;
30
        undyne.hspeed = 1;
31
        undyne.image_speed = 0.2;
32
    }
33
    else
34
    {
35
        con = 7;
36
    }
37
}
38
if (con == 7)
39
{
40
    undyne.hspeed = 0;
41
    undyne.image_speed = 0;
42
    global.facechoice = 5;
43
    global.faceemotion = 1;
44
    global.typer = 37;
45
    global.msg[0] = 
* Armor...Delay 11 so...Delay 11 hot...Delay 11Wait for input
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_undynetrigger_dry_122")
;
46
    global.msg[1] = 
* But I can't...Delay 11
* Give up...Wait for inputClose MessageClose Message
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_undynetrigger_dry_123")
;
47
    global.msc = 0;
48
    instance_create(0, 0, obj_dialoguer);
49
    con = 8;
50
}
51
if (con == 8 && instance_exists(OBJ_WRITER) == 0)
52
{
53
    undyne.hspeed = 0.5;
54
    undyne.image_speed = 0.1;
55
    alarm[4] = 40;
56
    con = 9;
57
}
58
if (con == 10)
59
{
60
    undyne.hspeed = 0;
61
    undyne.image_speed = 0;
62
    undyne.image_index = 0;
63
    alarm[4] = 60;
64
    con = 11;
65
}
66
if (con == 12)
67
{
68
    snd_play(snd_noise);
69
    undyne2 = instance_create(undyne.x, undyne.y, obj_undynefall);
70
    with (undyne)
71
        instance_destroy();
72
    con = 13;
73
}
74
if (con == 13)
75
{
76
    global.flag[17 menu_disabled] = 0;
77
    global.interact = 0;
78
    global.plot = 122;
79
    global.flag[350 status_undyne] = 2;
80
    instance_destroy();
81
}