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