Undertale script viewer

← back to main script listing

gml_Object_obj_playmovement_Create_0

(view raw script w/o annotations or w/e)
1
con = 0;
2
drawtext = 0;
3
drawtext2 = 0;
4
string1 = 
Oh my love
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;
("mett_opera1_1")
;
5
string2 = 
Please run away
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;
("mett_opera1_2")
;
6
strtime1 = 57;
7
strtime2 = 57;
8
image_yscale = 100;
9
if (global.plot > 166)
10
{
11
    instance_destroy();
12
}
13
else
14
{
15
    view_yview[0] = 120;
16
    obj_mainchara.cutscene = 1;
17
    view_object[0] = -4;
18
}
19
mainmove = 0;
20
frantic = 0;
21
alarm[10] = 15;
gml_Object_obj_playmovement_Alarm_10.gml

alarm[10] = 15; if (con > 10) { ql = 0; if ((mainmove - lastmove) > 10) ql += 1; franto = abs(obj_mainchara.x - lastx) + abs(obj_mainchara.y - lasty); if (franto < 30 && franto > 3) ql += 1; if (franto > 38) unfrantic += 1; lastx = obj_mainchara.x; lasty = obj_mainchara.y; if (ql == 2) frantic += 1; lastmove = mainmove; }
22
lastmove = 0;
23
lastx = obj_mainchara.x;
24
lasty = obj_mainchara.y;
25
unfrantic = 0;
26
face2 = 0;
27
touch = 0;
28
already = 0;
29
ossafe_ini_open("undertale.ini");
30
already = ini_read_real("Mett", "O", -1);
31
ossafe_ini_close();
32
skip = 0;