Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_hammer_bounce_controller_Step_2

(view raw script w/o annotations or w/e)
1
if (timer >= 30 && timer <= 42)
2
{
3
    with (obj_growtangle)
4
    {
5
        with (obj_heart)
6
            x += (obj_growtangle.x - obj_growtangle.xprevious);
7
        with (instance_create(x, y, obj_marker))
8
        {
9
            mask_index = spr_battlebg_collision_checker;
10
            image_angle = other.image_angle;
11
            image_xscale = other.image_xscale;
12
            image_yscale = other.image_yscale;
13
            if (i_ex(obj_heart))
14
            {
15
                var pointdir = point_direction(obj_heart.x + 10, obj_heart.y + 10, x, y);
16
                while (!position_meeting(obj_heart.x + 10, obj_heart.y + 10, id))
17
                {
18
                    with (obj_heart)
19
                    {
20
                        x += lengthdir_x(1, pointdir);
21
                        y += lengthdir_y(1, pointdir);
22
                    }
23
                }
24
            }
25
            instance_destroy();
26
        }
27
    }
28
}
29
with (obj_oflash)
30
{
31
    if (target == other.id)
32
    {
33
        x = other.x;
34
        y = other.y - other.z;
35
    }
36
}