Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_controller_dw_cyber_post_music_boss_slide_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    if (obj_mainchara.y > 700 && obj_mainchara.x > 1900 && global.flag[408 seen_djs_flyby] == 0)
4
    {
5
        global.flag[408 seen_djs_flyby] = 1;
6
        con++;
7
    }
8
}
9
if (con == 1)
10
{
11
    sweet = 0;
12
    nisekk = 0;
13
    djtable = 0;
14
    nisehatguy = 0;
15
    nisekk = instance_create(3074, (cameray() - 64 - 128 - 32 - 4) + 82, obj_marker);
16
    nisehatguy = instance_create(3072, (cameray() - 64 - 256) + 106, obj_marker);
17
    sweet = instance_create(3100, cameray() - 64 - 32, obj_marker);
18
    djtable = instance_create(sweet.x - 40, sweet.y + 64, obj_marker);
19
    with (sweet)
20
    {
21
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
22
        vspeed = 18;
23
        sprite_index = spr_sweet_dance;
24
        image_speed = 0.25;
25
        image_xscale = 2;
26
        image_yscale = 2;
27
    }
28
    with (nisehatguy)
29
    {
30
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
31
        vspeed = 18;
32
        sprite_index = spr_hatguy_idle;
33
        image_speed = 0.25;
34
        image_xscale = 2;
35
        image_yscale = 2;
36
    }
37
    with (nisekk)
38
    {
39
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
40
        vspeed = 18;
41
        sprite_index = spr_kk_button_press;
42
        image_speed = 0.25;
43
        image_xscale = 2;
44
        image_yscale = 2;
45
    }
46
    with (djtable)
47
    {
48
        scr_depth
scr_depth

function scr_depth() { depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
49
        vspeed = 18;
50
        sprite_index = spr_cutscene_cyber01_dj_table_side;
51
        image_speed = 0.25;
52
        image_xscale = 2;
53
        image_yscale = 2;
54
    }
55
    con++;
56
}
57
if (con == 2)
58
{
59
    if (charaX() < 2680)
60
    {
61
        global.flag[7 disable_menu?] = 1;
62
        block = instance_create(2720, 2600, obj_solidblocksized);
63
        blocklock = 0;
64
        con = 3;
65
    }
66
}
67
if (con == 3)
68
{
69
    if (i_ex(realsus))
70
        susx = realsus.x;
71
    if (i_ex(obj_mainchara))
72
        plx = obj_mainchara.x + obj_mainchara.sprite_width + 2;
73
    if (block.x > plx)
74
        block.x = plx;
75
    if (block.x > susx)
76
        block.x -= 2;
77
    if (block.x < 560)
78
        block.x = 560;
79
    if (charaX() <= 480)
80
    {
81
        global.flag[7 disable_menu?] = 0;
82
        con++;
83
    }
84
}
85
if (con == 4)
86
    block.x = 560;
87
if (instance_exists(obj_marker))
88
{
89
    with (obj_marker)
90
    {
91
        if (y > room_height)
92
            instance_destroy();
93
    }
94
}
95
if (con >= 3)
96
{
97
    if (instance_exists(obj_caterpillarchara))
98
    {
99
        with (obj_caterpillarchara)
100
        {
101
            if (name == "susie")
102
                other.realsus = id;
103
            if (name == "ralsei")
104
                other.realral = id;
105
        }
106
    }
107
    if (realsus.x < 2440 && watch == 0)
108
    {
109
        with (realsus)
110
        {
111
            fun = 1;
112
            sprite_index = spr_susie_walk_up_dw;
113
            image_index = 0;
114
            image_speed = 0;
115
            hspeed = -4;
116
            follow = 0;
117
        }
118
        watch = 1;
119
    }
120
    if (watch == 1)
121
    {
122
    }
123
    if (realral.x < 2480 && ralwatch == 0)
124
    {
125
        with (realral)
126
        {
127
            fun = 1;
128
            sprite_index = spr_ralsei_walk_up;
129
            image_index = 0;
130
            image_speed = 0;
131
            hspeed = -4;
132
            follow = 0;
133
        }
134
        ralwatch = 1;
135
    }
136
    if (realsus.x < 540 && watch == 1)
137
    {
138
        watch = 2;
139
        with (realsus)
140
        {
141
            fun = 0;
142
            hspeed = 0;
143
            follow = 1;
144
            scr_caterpillar_interpolate
scr_caterpillar_interpolate

function scr_caterpillar_interpolate() { _newfacing = scr_facing_letter_to_number(scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y))); remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (_iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target); if (global.darkzone == 1) remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target); else remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target); facing[_iaia] = _newfacing; } }
();
145
        }
146
    }
147
    if (realral.x < 540 && ralwatch == 1)
148
    {
149
        ralwatch = 2;
150
        with (realral)
151
        {
152
            fun = 0;
153
            hspeed = 0;
154
            follow = 1;
155
            scr_caterpillar_interpolate
scr_caterpillar_interpolate

function scr_caterpillar_interpolate() { _newfacing = scr_facing_letter_to_number(scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y))); remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (_iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target); if (global.darkzone == 1) remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target); else remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target); facing[_iaia] = _newfacing; } }
();
156
        }
157
    }
158
}