Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gerson_growtangle_transform_Step_0

(view raw script w/o annotations or w/e)
1
if (shrink == true)
2
{
3
    with (obj_growtangle)
4
    {
5
        maxxscale = lerp(maxxscale, 1.5, 0.2);
6
        maxyscale = lerp(maxyscale, 1.5, 0.2);
7
        image_xscale = lerp(image_xscale, 1.5, 0.2);
8
        image_yscale = lerp(image_yscale, 1.5, 0.2);
9
        repeat (6)
10
        {
11
            if (place_meeting(x, y, obj_heart))
12
            {
13
                obj_heart.x += lengthdir_x(1, point_direction(obj_heart.x, obj_heart.y, obj_growtangle.x, obj_growtangle.y));
14
                obj_heart.y += lengthdir_y(1, point_direction(obj_heart.x, obj_heart.y, obj_growtangle.x, obj_growtangle.y));
15
            }
16
        }
17
    }
18
}
19
if (grow == true)
20
{
21
    with (obj_growtangle)
22
    {
23
        maxxscale = lerp(maxxscale, 2, 0.2);
24
        maxyscale = lerp(maxyscale, 2, 0.2);
25
        image_xscale = lerp(image_xscale, 2, 0.2);
26
        image_yscale = lerp(image_yscale, 2, 0.2);
27
    }
28
}
29
timer++;
30
if (timer > 30)
31
    instance_destroy();
32
if (global.turntimer < 1)
33
    instance_destroy();