Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_martlet_final_overworld_cutscene_3_Step_0

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
switch scene
4
{
5
    case 0:
6
        cutscene_wait(1.5)
7
        break
8
    case 1:
9
        draw_alpha = lerp(draw_alpha, 0, 0.1)
10
        if (draw_alpha <= 0.01)
11
            draw_alpha = 0
12
        if (draw_alpha == 0)
13
            scene++
14
        break
15
    case 2:
16
        cutscene_wait(1)
17
        break
18
    case 3:
19
        cutscene_dialogue()
20
        with (msg)
21
        {
22
            talker[0] = 1164
23
            message[0] = "* Humans are dangerous#  and cannot be trusted."
24
            prt[0] = 315
25
        }
26
        break
27
    case 4:
28
        cutscene_npc_walk(1164, 200, 100, 1, "y", "up")
29
        break
30
    case 5:
31
        cutscene_wait(1)
32
        break
33
    case 6:
34
        audio_play_sound(snd_sliding_door_open, 1, 0)
35
        cutscene_advance()
36
        break
37
    case 7:
38
        obj_truelab_door.hspeed = 4
39
        if (obj_truelab_door.x > 220)
40
        {
41
            cutscene_advance()
42
            obj_truelab_door.hspeed = 0
43
        }
44
        break
45
    case 8:
46
        cutscene_wait(1.5)
47
        break
48
    case 9:
49
        cutscene_dialogue()
50
        with (msg)
51
        {
52
            talker[0] = 1164
53
            message[0] = "* Humans are dangerous..."
54
            prt[0] = 315
55
        }
56
        break
57
    case 10:
58
        cutscene_wait(2)
59
        break
60
    case 11:
61
        cutscene_npc_walk(1164, 200, 80, 0.2, "y", "up")
62
        cutscene_advance()
63
        break
64
    case 12:
65
        cymbal_sound = audio_play_sound(mus_cymbal, 1, 0)
66
        cutscene_advance()
67
        break
68
    case 13:
69
        draw_alpha_white = audio_sound_get_track_position(cymbal_sound) / audio_sound_length(mus_cymbal)
70
        if (draw_alpha_white >= 0.99)
71
        {
72
            draw_alpha_white = 1
73
            cutscene_advance()
74
        }
75
        break
76
    case 14:
77
        cutscene_wait(1.5)
78
        break
79
    case 15:
80
        cutscene_dialogue()
81
        with (msg)
82
        {
83
            talker[0] = 1164
84
            message[0] = "* Humans are dangerous..."
85
        }
86
        break
87
    case 16:
88
        cutscene_wait(2)
89
        break
90
    case 17:
91
        global.hotland_flag[9] = 2
92
        global.battle_enemy_name = "martlet genocide final"
93
        global.battling_boss = true
94
        global.battle_start = true
95
        global.sound_carry_overworld = false
96
        if (global.current_hp_self < global.max_hp_self)
97
            global.current_hp_self = global.max_hp_self
98
        scr_battle_save
scr_battle_save

function scr_battle_save() //gml_Script_scr_battle_save { if file_exists("tempsave.sav") file_delete("tempsave.sav") ini_open("tempsave.sav") ini_write_real("Save1", "HP", global.current_hp_self) ini_write_real("Save1", "MAXHP", global.max_hp_self) ini_write_real("Save1", "PP", global.current_pp_self) ini_write_real("Save1", "MAXPP", global.max_pp_self) ini_write_real("Save1", "SP", global.current_sp_self) ini_write_real("Save1", "MAXSP", global.max_sp_self) ini_write_real("Save1", "AT - Primary", global.player_attack) ini_write_real("Save1", "AT - Secondary", global.player_weapon_modifier_attack) ini_write_real("Save1", "DFP", global.player_defense) ini_write_real("Save1", "DFS", global.player_armor_modifier_defense) ini_write_real("Save1", "LV", global.player_level) ini_write_real("Save1", "EXP", global.player_exp) ini_write_real("Save1", "Gold", global.player_gold) ini_write_string("Save1", "Armor", global.player_armor) ini_write_string("Save1", "Ammo", global.player_weapon_modifier) ini_write_string("Save1", "Weapon", global.player_weapon) ini_write_string("Save1", "Accessory", global.player_armor_modifier) ini_write_string("Save1", "rmName", global.saveroom) ini_write_string("Save1", "playerSprite", global.player_sprites) ini_write_real("Save1", "ffight", global.fighting_flowey) if instance_exists(obj_radio) ini_write_real("Save1", "owms", obj_radio.bgm) var inv1 = global.item_slot[1] ini_write_string("Items", "00", global.item_slot[1]) ini_write_string("Items", "01", global.item_slot[2]) ini_write_string("Items", "02", global.item_slot[3]) ini_write_string("Items", "03", global.item_slot[4]) ini_write_string("Items", "04", global.item_slot[5]) ini_write_string("Items", "05", global.item_slot[6]) ini_write_string("Items", "06", global.item_slot[7]) ini_write_string("Items", "07", global.item_slot[8]) if (global.battle_enemy_name == "flowey") { ini_write_real("Special", "0", global.flowey_battle_1_phase) var list_string = ds_list_write(global.flowey_attack_list) ini_write_string("Special", "1", list_string) list_string = ds_list_write(global.flowey_stolen_attack_list) ini_write_string("Special", "2", list_string) list_string = ds_list_write(global.flowey_room_list) ini_write_string("Special", "3", list_string) ini_write_real("Special", "4", global.flowey_attack_number) } else if (global.battle_enemy_name == "flowey2") { for (var i = 0; i < array_length(obj_flowey_battle_final.petal_alive); i++) ini_write_real("petal", string(i), obj_flowey_battle_final.petal_alive[i]) ini_write_real("petal", "count", obj_flowey_battle_final.petal_count) } ini_close() }
()
99
        room_goto(rm_battle Battle room)
100
        persistent = true
101
        scene++
102
        break
103
    case 18:
104
        if (room != rm_battle)
105
            return;
106
        if instance_exists(obj_battle_fade_in_screen)
107
        {
108
            instance_destroy(obj_battle_fade_in_screen)
109
            instance_create_depth(0, 0, -9999, obj_battle_fade_in_screen_white)
110
        }
111
        instance_destroy()
112
        break
113
}