Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_stream_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer == 20)
3
{
4
    var xoff = 0;
5
    var yoff = 0;
6
    var plane_shift = choose(true, false);
7
    if (plane_shift)
8
        xoff = irandom_range(-40, 40);
9
    else
10
        yoff = irandom_range(-40, 40);
11
    
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(obj_growtangle.x + xoff, obj_growtangle.y + yoff, obj_bullet_knight_stream, slash_angle, 0, spr_nothing);
12
    
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(obj_growtangle.x + xoff, obj_growtangle.y + yoff, obj_bullet_knight_stream, 180 - slash_angle, 0, spr_nothing);
13
}
14
if (timer == 23)
15
{
16
    with (obj_bullet_knight_stream)
17
    {
18
        if (can_do_slashes)
19
        {
20
            
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x + lengthdir_x(60, direction + 270), y + lengthdir_y(60, direction + 270), obj_knight_streamline, direction, 0, spr_nothing);
21
            
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x - lengthdir_x(60, direction + 270), y - lengthdir_y(60, direction + 270), obj_knight_streamline, direction, 0, spr_nothing);
22
        }
23
    }
24
}
25
if (timer == 26)
26
{
27
    with (obj_bullet_knight_stream)
28
    {
29
        if (can_do_slashes)
30
        {
31
            
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x + lengthdir_x(120, direction + 270), y + lengthdir_y(120, direction + 270), obj_knight_streamline, direction, 0, spr_nothing);
32
            
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x - lengthdir_x(120, direction + 270), y - lengthdir_y(120, direction + 270), obj_knight_streamline, direction, 0, spr_nothing);
33
        }
34
    }
35
}
36
if (timer == 29)
37
{
38
    with (obj_bullet_knight_stream)
39
    {
40
        if (can_do_slashes)
41
        {
42
            
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x + lengthdir_x(180, direction + 270), y + lengthdir_y(180, direction + 270), obj_knight_streamline, direction, 0, spr_nothing);
43
            
scr_fire_bullet
scr_fire_bullet

function
scr_fire_bullet(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
{ var bullet; if (arg8 != 87135) bullet = instance_create_depth(arg0, arg1, arg8, arg2); else bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; if (arg5 != -4) sprite_index = arg5; updateimageangle = arg6; if (arg6) image_angle = arg3; if (arg7) { with (other)
scr_bullet_inherit(other.id);
} } return bullet; } function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0) { var bullet = instance_create(arg0, arg1, arg2); with (bullet) { direction = arg3; speed = arg4; sprite_index = arg5; image_blend = arg6; updateimageangle = arg7; if (arg7) image_angle = arg3; } return bullet; }
(x - lengthdir_x(180, direction + 270), y - lengthdir_y(180, direction + 270), obj_knight_streamline, direction, 0, spr_nothing);
44
            can_do_slashes = false;
45
        }
46
    }
47
}
48
if (timer == 45)
49
{
50
    slash_angle += (25 + irandom(25));
51
    if (slash_angle > 70)
52
        slash_angle -= 40;
53
    timer = 0;
54
}