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