Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_DEVICE_FAILURE_Create_0

(view raw script w/o annotations or w/e)
1
EVENT = 0;
2
TIMER = 0;
3
HEARTMADE = 0;
4
HSINER = 0;
5
OBMADE = 0;
6
global.flag[20 other_text_command] = 0;
7
global.flag[6 disable_text_skip] = 1;
8
global.typer = 667;
9
scr_windowcaption
scr_windowcaption

function
scr_windowcaption(arg0)
{ if (global.tempflag[10] != 1 && global.chapter == 1) window_set_caption(arg0); else window_set_caption("DELTARUNE Chapter " + string(global.chapter)); }
(stringsetloc(
THE DEATH
"THE DEATH", "DEVICE_FAILURE_slash_Create_0_gml_12_0"
));
10
FADEFACTOR = 0;
11
WHITEFADE = 0;
12
FADEUP = 0;
13
DARK_WAIT = 0;
14
text_timer = 30;
15
restart = false;
16
restart_timer = 0;
17
gamepad_controls = [gp_face1, gp_face2, gp_face3, gp_face4, gp_shoulderl, gp_shoulderlb, gp_shoulderr, gp_shoulderrb, gp_select, gp_start, gp_stickl, gp_stickr, gp_padu, gp_padd, gp_padl, gp_padr];
18
knight_mode = false;
19
knight_mode_con = -1;
20
if (global.chapter > 1)
21
{
22
    if (global.chapter == 3)
23
    {
24
        if (global.tempflag[93] == 1)
25
        {
26
            heart_marker = 
scr_marker
scr_marker

function
scr_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; } return thismarker; }
(156, 40, spr_heart);
27
            heart_marker.depth = depth - 1000;
28
            heart_marker.image_xscale = 0.5;
29
            heart_marker.image_yscale = 0.5;
30
            var previous_times_attempted = scr_get_knight_total_attempts();
31
            if (previous_times_attempted > 0)
32
            {
33
                EVENT = -1;
34
                knight_mode = true;
35
                knight_mode_con = 0;
36
                snd_free_all();
37
                global.currentsong[0] = snd_init("AUDIO_DRONE.ogg");
38
                global.currentsong[1] = mus_loop(global.currentsong[0]);
39
                global.typer = 667;
40
                global.fc = 0;
41
                global.flag[6 disable_text_skip] = 0;
42
                with (obj_event_manager)
43
                    trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_13);
44
                if (variable_global_exists("knight_battle_losses"))
45
                {
46
                    global.knight_battle_losses++;
47
                    if (global.knight_battle_losses >= 2)
48
                    {
49
                        knight_mode_con = 20;
50
                        if (
scr_armorcheck_equipped_party
scr_armorcheck_equipped_party

function
scr_armorcheck_equipped_party(arg0)
{ var __totalwearing = 0; for (var __weari = 0; __weari < 3; __weari++) { if (global.char[__weari] != 0) __totalwearing +=
scr_armorcheck_equipped(global.char[__weari], arg0);
} return __totalwearing; }
(23) == 0)
51
                            knight_mode_con = 40;
52
                    }
53
                    if (global.knight_battle_losses >= 3)
54
                    {
55
                        var show_unique_message = false;
56
                        if (global.tempflag[96] == 1)
57
                        {
58
                            global.tempflag[96] = 0;
59
                            show_unique_message = 
scr_flag_get
scr_flag_get

function
scr_flag_get(arg0)
{ var flag_value = global.flag[arg0]; return flag_value; }
(1263) == 0;
60
                        }
61
                        if (show_unique_message)
62
                        {
63
                            
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; }
(1263, 1);
64
                            knight_mode_con = 30;
65
                        }
66
                        else
67
                        {
68
                            knight_mode_con = 50;
69
                        }
70
                    }
71
                }
72
                else
73
                {
74
                    global.knight_battle_losses = 1;
75
                }
76
                
scr_flag_set
scr_flag_set

function
scr_flag_set(arg0, arg1)
{ global.flag[arg0] = arg1; }
(1264, global.knight_battle_losses);
77
            }
78
        }
79
    }
80
    if (!knight_mode)
81
    {
82
        with (obj_event_manager)
83
            trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_13);
84
        var gameover_bg = instance_create(0, 20, obj_gameoverbg);
85
        with (gameover_bg)
86
            
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
87
    }
88
}
89
90
enum UnknownEnum
91
{
92
    Value_0,
93
    Value_13 = 13
94
}