Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_determination_Step_0

(view raw script w/o annotations or w/e)
1
if keyboard_multicheck_pressed(0)
2
{
3
    if (scr_interact
scr_interact

function scr_interact() //gml_Script_scr_interact { if (distance_to_object(obj_pl) < 20 && obj_pl.state == gml_Script_scr_normal_state) { var pl_dir = obj_pl.direction var pl_x = 0 var pl_y = 0 var check_distance_x = 0 var check_distance_y = 0 switch pl_dir { case 0: pl_x = obj_pl.bbox_right pl_y = obj_pl.bbox_top + 1 check_distance_x = 20 break case 180: pl_x = obj_pl.bbox_left pl_y = obj_pl.bbox_top + 1 check_distance_x = -20 break case 90: pl_x = obj_pl.x pl_y = obj_pl.bbox_top check_distance_y = -20 break case 270: pl_x = obj_pl.x pl_y = obj_pl.bbox_bottom check_distance_y = 20 break } if collision_line_first(pl_x, pl_y, (pl_x + check_distance_x), (pl_y + check_distance_y), id, false, false) return true; } }
() == true)
4
    {
5
        if (global.route == 3 && global.hotland_flag[9] >= 3)
6
        {
7
            spawn_save_box = true
8
            scr_text
scr_text

function scr_text() //gml_Script_scr_text { if (!instance_exists(obj_dialogue)) msg = instance_create(x, y, obj_dialogue) }
()
9
            with (msg)
10
            {
11
                message[0] = "* (Nothing but the echoes of#  your efforts linger.)"
12
                message[1] = "* (You are filled with a sense#  of justice.)"
13
            }
14
        }
15
        else if (!instance_exists(obj_savebox))
16
        {
17
            if (global.party_member != -4 || (global.route == 2 && room == rm_steamworks_23) || room == rm_steamworks_macro_froggit_room)
18
            {
19
                instance_create(((__view_get((0 << 0), 0)) + 160), ((__view_get((1 << 0), 0)) + 120), obj_savebox)
20
                audio_play_sound(snd_mainmenu_select, 1, 0)
21
            }
22
            else
23
            {
24
                instance_destroy()
25
                global.cutscene = true
26
                instance_create(x, (y - 5), obj_savefl)
27
            }
28
        }
29
    }
30
}
31
if (global.flowey_death_pop == true)
32
{
33
    instance_destroy()
34
    instance_create(x, (y - 5), obj_savefl)
35
}
36
if (spawn_save_box == true)
37
{
38
    if (!instance_exists(obj_dialogue))
39
    {
40
        scr_determine_save_area
scr_determine_save_area

function scr_determine_save_area() //gml_Script_scr_determine_save_area { var current_room = room_get_name(room) switch current_room { case "rm_darkruins_03": current_save_number = 1 global.saveroom = "Dark Ruins - Entrance" break case "rm_darkruins_08": current_save_number = 2 global.saveroom = "Dark Ruins - Atrium" break case "rm_darkruins_10": current_save_number = 3 global.saveroom = "Dark Ruins - Cliff" break case "rm_darkruins_12": current_save_number = 4 global.saveroom = "Dark Ruins - Puzzle" break case "rm_darkruins_16": current_save_number = 5 global.saveroom = "Dark Ruins - Hall" break case "rm_snowdin_03_yellow": current_save_number = 1 global.saveroom = "Snowdin - Delta Rock" break case "rm_snowdin_08_yellow": current_save_number = 2 global.saveroom = "Snowdin - Ruined Shack" break case "rm_snowdin_12_yellow": current_save_number = 3 global.saveroom = "Snowdin - Pathway" break case "rm_snowdin_14_yellow": current_save_number = 4 global.saveroom = "Snowdin - Resort" break case "rm_snowdin_20_yellow": current_save_number = 5 global.saveroom = "Snowdin - Corridor" break case "rm_dunes_02": current_save_number = 1 global.saveroom = "Dunes - Cave" break case "rm_dunes_08": current_save_number = 2 global.saveroom = "Dunes - Tree" break case "rm_dunes_14": current_save_number = 3 global.saveroom = "Mines - Elevator" break case "rm_dunes_20": current_save_number = 4 global.saveroom = "Mines - Minecart" break case "rm_dunes_25": current_save_number = 5 global.saveroom = "Dunes - Mountaintop" break case "rm_dunes_28": current_save_number = 6 global.saveroom = "Dunes - Playground" break case "rm_dunes_34": current_save_number = 7 global.saveroom = "Dunes - Well" break case "rm_dunes_37": current_save_number = 8 global.saveroom = "Wild East - Town" break case "rm_dunes_39": current_save_number = 9 global.saveroom = "Wild East - Outskirts" break case "rm_dunes_41": current_save_number = 10 global.saveroom = "Wild East - Sunnyside" break case "rm_steamworks_05": current_save_number = 11 global.saveroom = "Steamw. - Generator" break case "rm_steamworks_09": current_save_number = 12 global.saveroom = "Steamw. - Raised Path" break case "rm_steamworks_15": current_save_number = 13 global.saveroom = "Steamw. - Lake" break case "rm_steamworks_19": current_save_number = 14 global.saveroom = "Steamw. - Offices" break ...
()
41
        instance_create(((__view_get((0 << 0), 0)) + 160), ((__view_get((1 << 0), 0)) + 120), obj_savebox)
42
        audio_play_sound(snd_mainmenu_select, 1, 0)
43
        spawn_save_box = false
44
    }
45
}