Undertale script viewer

← back to main script listing

gml_Object_obj_endbeachanim_Step_0

(view raw script w/o annotations or w/e)
1
if (active == 1)
2
    timer += 1;
3
if (view_xview[0] >= 0 && timer < 20)
4
    view_xview[0] -= 2;
5
var textx = 168;
6
if (global.language == "ja")
7
    textx -= 16;
8
if (timer == 0)
9
{
10
    t1 = instance_create(textx, 15, obj_creditsword);
11
    t1.text = 
UNDYNE
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;
("castroll_name_undyne")
;
12
    if (global.language == "ja")
13
        t1.text_xofs = -1;
14
    t1.text2 = 
Design by Toby#Armor by Temmie#Fashion help:#JN Wiedle
Gigi DG
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;
("castroll_credit_undyne")
;
15
    t2 = instance_create(textx, 150, obj_creditsword);
16
    t2.text = 
ALPHYS
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;
("castroll_name_alphys")
;
17
    if (global.language == "ja")
18
        t2.text_xofs = -1;
19
    t2.text2 = 
Design by Toby
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;
("castroll_credit_alphys")
;
20
}
21
if (timer == 5)
22
    shuffle = 1;
23
if (timer == 25)
24
    shuffle = 0;
25
if (timer == 65)
26
    shuffle = 1;
27
if (timer == 85)
28
    shuffle = 0;
29
if (timer == 125)
30
    shuffle = 1;
31
if (timer == 145)
32
    shuffle = 0;
33
if (shuffle == 1)
34
{
35
    x -= 0.5;
36
    image_index += 0.2;
37
}
38
if (timer == 170)
39
    head_index = 1;
40
if (timer == 191 || timer == 193)
41
    headx += 1;
42
if (timer == 210 || timer == 212)
43
    headx -= 1;
44
if (timer == 214 || timer == 216)
45
{
46
    head_index = 2;
47
    headx -= 1;
48
    heady += 1;
49
}
50
if (timer == 216)
51
{
52
    heart = instance_create(x - 5, y - 10, obj_npc_marker);
53
    heart.image_speed = 0.25;
54
    heart.visible = true;
55
    heart.sprite_index = spr_tinygayheart;
56
    heart.vspeed = -0.5;
57
    alphys.image_index = 0;
58
    alphys.image_speed = 0;
59
}
60
if (timer == 226)
61
    alphys.sprite_index = spr_alphys_turnred;
62
if (timer > 226 && timer < 246)
63
    heart.image_alpha -= 0.05;
64
if (timer == 247)
65
{
66
    with (heart)
67
        instance_destroy();
68
}
69
if (timer == 246 || timer == 248)
70
{
71
    head_index = 1;
72
    heady -= 1;
73
    headx += 1;
74
}
75
if (timer >= 268 && timer <= 300)
76
{
77
    head_index = 3;
78
    if (alphys.image_index < 16)
79
        alphys.image_index += 0.5;
80
}
81
if (timer == 320)
82
{
83
    alphys.sprite_index = spr_alphys_shock_fall;
84
    alphys.x -= 2;
85
}
86
if (timer == 321)
87
    alphys.x -= 2;
88
if (timer == 322)
89
    alphys.x -= 2;
90
if (timer == 323)
91
    alphys.x -= 2;
92
if (timer == 324)
93
    alphys.x -= 1;
94
if (timer == 325)
95
    alphys.x -= 1;
96
if (timer == 326)
97
    alphys.x -= 1;
98
if (timer == 327)
99
    alphys.x -= 1;
100
if (timer == 370)
101
{
102
    headsprite = spr_undyne_head_chuckle;
103
    sprite_index = spr_undyne_torso_tap;
104
    siner = 0;
105
}
106
if (timer >= 370 && timer <= 440)
107
{
108
    siner += 1;
109
    heady = sin(siner / 2) * 0.8;
110
    image_index += 0.25;
111
    head_index += 0.25;
112
}
113
if (timer == 440)
114
{
115
    image_index = 0;
116
    headsprite = spr_undyne_head_laugh;
117
    sprite_index = spr_undyne_torso_hit;
118
    alarm[0] = 8;
gml_Object_obj_endbeachanim_Alarm_0.gml

instance_create(x + 18, y + 13, obj_beachdebris); alarm[0] = 8; if (crack == 0) crack = 1; ctime += 1; if (ctime > 5) crack = 2; if (ctime > 10) crack = 3;
119
}
120
if (timer >= 440)
121
{
122
    with (t1)
123
        fader = 1;
124
    with (t2)
125
        fader = 1;
126
    siner += 1;
127
    heady = (sin(siner / 2) * 1.2) + 0.6;
128
    image_index += 0.25;
129
    head_index += 0.25;
130
}
131
if (timer >= 500)
132
{
133
    view_xview[0] += 4;
134
    if (view_xview[0] >= 160)
135
    {
136
        global.cast_type = 2;
137
        room_goto(room_end_castroll Pacifist credits [Dogchecked]);
138
    }
139
}