Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_shadow_mantle_clone_Step_0

(view raw script w/o annotations or w/e)
1
if (dashcon == 1)
2
{
3
    direction = point_direction(x, y + 16, 170 + irandom(295), 270);
4
    if (global.shadow_mantle_losses < 7)
5
        gravity = 0.24;
6
    else
7
        gravity = 0.2;
8
    gravity_direction = direction;
9
    speed = 2;
10
    dashtimer = 28;
11
    dashcon = 2;
12
    snd_stop(snd_board_mantle_dash_slow);
13
    snd_play_pitch(snd_board_mantle_dash_slow, 0.95 + random(0.1));
14
}
15
if (dashcon == 2)
16
{
17
    dashtimer++;
18
    if (dashtimer >= 30 && (dashtimer % 2) == 0 && i_ex(obj_shadow_mantle_enemy))
19
    {
20
        if (global.shadow_mantle_losses < 7)
21
            gravity += 0.03;
22
        else if (global.shadow_mantle_losses < 14)
23
            gravity += 0.023;
24
        else
25
            gravity += 0.017;
26
        instance_create_depth(x + 16, y + 16, depth + 1, obj_shadow_mantle_groundfire);
27
    }
28
    instance_create_depth(x + 16 + lengthdir_x(speed, direction), y + 16 + lengthdir_y(speed, direction), depth - 1, obj_shadow_mantle_dash_hitbox);
29
    if (y > (cameray() + cameraheight()) || y < (cameray() - 100) || x < (camerax() + 32) || x > (camerax() + camerawidth()))
30
        instance_destroy();
31
}