Deltarune (Chapter 3) script viewer

← back to main script listing

gml_GlobalScript_scr_fire_bullet

(view raw script w/o annotations or w/e)
1
function 
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; }
(arg0, arg1, arg2, arg3, arg4, arg5 = -4, arg6 = 0, arg7 = false, arg8 = 87135)
2
{
3
    var bullet;
4
    if (arg8 != 87135)
5
        bullet = instance_create_depth(arg0, arg1, arg8, arg2);
6
    else
7
        bullet = instance_create(arg0, arg1, arg2);
8
    with (bullet)
9
    {
10
        direction = arg3;
11
        speed = arg4;
12
        if (arg5 != -4)
13
            sprite_index = arg5;
14
        updateimageangle = arg6;
15
        if (arg6)
16
            image_angle = arg3;
17
        if (arg7)
18
        {
19
            with (other)
20
                
scr_bullet_inherit
scr_bullet_inherit

function
scr_bullet_inherit(arg0)
{ if (i_ex(arg0)) { if (damage != -1) arg0.damage = damage; if (grazepoints != -1) arg0.grazepoints = grazepoints; if (timepoints != -1) arg0.timepoints = timepoints; if (inv != -1) arg0.inv = inv; if (target != -1) arg0.target = target; if (grazed != -1) arg0.grazed = 0; if (grazetimer != -1) arg0.grazetimer = 0; if (object_index == obj_dbulletcontroller) { arg0.creatorid = creatorid; arg0.creator = creator; } arg0.element = element; } }
(other.id);
21
        }
22
    }
23
    return bullet;
24
}
25
26
function scr_fire_bullet_colorize(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7 = 0)
27
{
28
    var bullet = instance_create(arg0, arg1, arg2);
29
    with (bullet)
30
    {
31
        direction = arg3;
32
        speed = arg4;
33
        sprite_index = arg5;
34
        image_blend = arg6;
35
        updateimageangle = arg7;
36
        if (arg7)
37
            image_angle = arg3;
38
    }
39
    return bullet;
40
}