Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_musical_note_bullet_Step_0

(view raw script w/o annotations or w/e)
1
timer++;
2
if (timer > 90)
3
{
4
    active = 0;
5
    image_alpha -= 0.25;
6
    if (image_alpha < 0)
7
        instance_destroy();
8
}
9
if (copymake > 0)
10
{
11
    var child = scr_childbullet
scr_childbullet

function scr_childbullet() { var __child = instance_create(argument[0], argument[1], argument[2]); var __parent = (argument_count == 4) ? argument[3] : id; if (__parent.damage != -1) __child.damage = __parent.damage; if (__parent.grazepoints != -1) __child.grazepoints = __parent.grazepoints; if (__parent.timepoints != -1) __child.timepoints = __parent.timepoints; if (__parent.inv != -1) __child.inv = __parent.inv; if (__parent.target != -1) __child.target = __parent.target; if (__parent.grazed != -1) __child.grazed = __parent.grazed; if (__parent.grazetimer != -1) __child.grazetimer = __parent.grazetimer; __child.element = __parent.element; return __child; }
(x, y, object_index, id);
12
    child.grazepoints = 0.1;
13
    child.timepoints = 0.01;
14
    child.timer = 87;
15
    if (bultype == 1)
16
        child.timer = 87;
17
    child.sprite_index = sprite_index;
18
    child.depth = depth + 1;
19
    child.image_angle = image_angle;
20
    copymake--;
21
}
22
if (grow)
23
{
24
    growtimer++;
25
    image_xscale = lerp_ease_out(0.2, 1.5, growtimer / 10, -2);
26
    image_yscale = lerp_ease_out(0.2, 1.5, growtimer / 10, -2);
27
    if (growtimer >= 10)
28
        grow = 0;
29
}
30
if (growb)
31
{
32
    image_xscale += ((sin(timer / 2) * 0.04) + 0.012);
33
    var a = scr_afterimage
scr_afterimage

function scr_afterimage() { afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
34
    a.image_alpha = 0.5;
35
}