Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_dogcar_controller_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0 && obj_mainchara.x >= x)
2
{
3
    instance_create(__view_get(e__VW.XView, 0) + 700, obj_mainchara.y, obj_dogcar);
4
    con = 1;
5
}
6
if (con == 2)
7
{
8
    global.interact = 1;
9
    with (obj_mainchara)
10
alarm[1]
11
    black = 1;
12
    with (obj_dogcar)
13
        instance_destroy();
14
    with (obj_animation)
15
        instance_destroy();
16
    with (obj_dmgwriter)
17
        instance_destroy();
18
    audio_stop_all();
19
    audio_play_sound(snd_break2, 50, 0);
20
    con = 3;
21
    timer = 0;
22
    remy = obj_mainchara.y;
23
    remx = obj_mainchara.x;
24
    fellkris = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(obj_mainchara.x, obj_mainchara.y, spr_kris_fell);
25
    fellkris.depth = -200;
26
}
27
if (con == 3)
28
{
29
    timer += 1;
30
    if (timer >= 45)
31
    {
32
        timer = 0;
33
        con = 4;
34
    }
35
}
36
if (con == 4)
37
{
38
    mus_initloop("gameover_short.ogg");
39
    instance_create(__view_get(e__VW.XView, 0) + 110, __view_get(e__VW.YView, 0) + 100, obj_dogcar_gameover);
40
    con = 5;
41
    timer = 0;
42
}
43
if (con == 5)
44
{
45
    with (fellkris)
46
    {
47
        image_alpha -= 0.04;
48
        y += 4;
49
    }
50
    timer += 1;
51
    if (timer >= 120)
52
    {
53
        con = 6;
54
        timer = 0;
55
        snd_free_all();
56
        dogcar = instance_create(__view_get(e__VW.XView, 0) + 700, obj_dogcar_gameover.y + 50, obj_dogcar);
57
        dogcar.hspeed = -30;
58
        dogcar.mode = 1;
59
    }
60
}
61
if (con == 6)
62
{
63
    if (!instance_exists(obj_dogcar_gameover))
64
    {
65
        timer += 1;
66
        if (timer >= 100)
67
        {
68
            global.flag[917 ch2_egg_room] = 1;
69
            global.interact = 0;
70
            global.facing = 0;
71
            fader = instance_create(0, 0, obj_persistentfadein);
72
            fader.image_alpha = 6;
73
            fader.fadespeed = -2;
74
            
scr_itemget
scr_itemget

function
scr_itemget(arg0)
{ var __i = 0; var loop = 1; noroom = 0; _pocketed = 0; _noroominventory = 0; global.item[12] = 999; while (loop == 1) { if (global.item[__i] == 0) { global.item[__i] = arg0; break; } if (__i == 12) { _noroominventory = 1; noroom = 1; for (var __j = 0; __j < global.flag[64 storage_size]; __j++) { if (global.pocketitem[__j] == 0) { global.pocketitem[__j] = arg0; _pocketed = 1; noroom = 0; break; } } break; } __i += 1; } script_execute(scr_iteminfo_all); }
(33);
75
            room_goto(room_dw_city_moss );
76
        }
77
    }
78
}
79
80
enum e__VW
81
{
82
    XView,
83
    YView,
84
    WView,
85
    HView,
86
    Angle,
87
    HBorder,
88
    VBorder,
89
    HSpeed,
90
    VSpeed,
91
    Object,
92
    Visible,
93
    XPort,
94
    YPort,
95
    WPort,
96
    HPort,
97
    Camera,
98
    SurfaceID
99
}