Deltarune (Chapter 5) script viewer

← back to main script listing

gml_GlobalScript_scr_gameover

(view raw script w/o annotations or w/e)
1
function 
scr_gameover
scr_gameover

function
scr_gameover(arg0 = true)
{ if (global.chapter == 5) { global.flag[57] = 0; if (i_ex(obj_flowery_enemy) && global.flag[1865] == 1) global.flag[1865] = 2; with (obj_orangeheart_floweryjarona) stopthat = true; } if (global.flag[35 gameover_mode] == 0) { audio_stop_all(); if (arg0) snd_play(snd_hurt1); global.gameover_room = room; global.screenshot = sprite_create_from_surface(application_surface, 0, 0, __view_get(e__VW.WView, 0), __view_get(e__VW.HView, 0), 0, 0, 0, 0); snd_free_all(); room_goto(room_gameover ); } if (global.flag[35 gameover_mode] == 1) { global.turntimer = -1; global.flag[36 dojo_failure] = 1; global.flag[39 dojo_abort?] = 1; } if (global.flag[35 gameover_mode] == 2) { audio_stop_all(); snd_play(snd_hurt1); snd_free_all(); global.entrance = 0; global.tempflag[9] = 1; global.fighting = 0; global.interact = 0; global.hp[0] = 1; global.hp[1] = 1; global.hp[2] = 1; global.hp[3] = 1; __room = room; if (global.chapter == 2) { with (instance_create(0, 0, obj_persistentfadein)) image_alpha = 1.2; } room_goto(__room); } } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
(arg0 = true)
2
{
3
    if (global.chapter == 5)
4
    {
5
        global.flag[57] = 0;
6
        if (i_ex(obj_flowery_enemy) && global.flag[1865] == 1)
7
            global.flag[1865] = 2;
8
        with (obj_orangeheart_floweryjarona)
9
            stopthat = true;
10
    }
11
    if (global.flag[35 gameover_mode] == 0)
12
    {
13
        audio_stop_all();
14
        if (arg0)
15
            snd_play(snd_hurt1);
16
        global.gameover_room = room;
17
        global.screenshot = sprite_create_from_surface(application_surface, 0, 0, __view_get(e__VW.WView, 0), __view_get(e__VW.HView, 0), 0, 0, 0, 0);
18
        snd_free_all();
19
        room_goto(room_gameover );
20
    }
21
    if (global.flag[35 gameover_mode] == 1)
22
    {
23
        global.turntimer = -1;
24
        global.flag[36 dojo_failure] = 1;
25
        global.flag[39 dojo_abort?] = 1;
26
    }
27
    if (global.flag[35 gameover_mode] == 2)
28
    {
29
        audio_stop_all();
30
        snd_play(snd_hurt1);
31
        snd_free_all();
32
        global.entrance = 0;
33
        global.tempflag[9] = 1;
34
        global.fighting = 0;
35
        global.interact = 0;
36
        global.hp[0] = 1;
37
        global.hp[1] = 1;
38
        global.hp[2] = 1;
39
        global.hp[3] = 1;
40
        __room = room;
41
        if (global.chapter == 2)
42
        {
43
            with (instance_create(0, 0, obj_persistentfadein))
44
                image_alpha = 1.2;
45
        }
46
        room_goto(__room);
47
    }
48
}
49
50
enum e__VW
51
{
52
    XView,
53
    YView,
54
    WView,
55
    HView,
56
    Angle,
57
    HBorder,
58
    VBorder,
59
    HSpeed,
60
    VSpeed,
61
    Object,
62
    Visible,
63
    XPort,
64
    YPort,
65
    WPort,
66
    HPort,
67
    Camera,
68
    SurfaceID
69
}