Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_redshape_Create_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
radius = 22;
3
light = 0;
4
image_blend = c_red;
5
tracking_val2 = 1;
6
destroyonhit = false;
7
speed_max *= 2.5;
8
9
do_shrivel = function()
10
{
11
};
12
13
do_pushback = function()
14
{
15
};
16
17
check_death = function()
18
{
19
};
20
21
chase_heart = function()
22
{
23
    var hx = obj_heart.x + 10;
24
    var hy = obj_heart.y + 10;
25
    if (i_ex(obj_heart))
26
    {
27
        if (point_distance(x, y, hx, hy) < (obj_darkshape_light_aura.radius + 8) || light > 0)
28
            speed = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(speed, speed_max * speed_max_multiplier * 0.5, speed * 0.25);
29
        else
30
            speed = 
scr_approach
scr_approach

function
scr_approach(arg0, arg1, arg2)
{ if (arg0 < arg1) { arg0 += arg2; if (arg0 > arg1) return arg1; } else { arg0 -= arg2; if (arg0 < arg1) return arg1; } return arg0; }
(speed, speed_max * speed_max_multiplier, accel * speed_max_multiplier * (1 - light));
31
        var anglediff = angle_difference(direction, point_direction(x, y, hx, hy));
32
        if (tracking_val2 > 0)
33
            direction = scr_angle_lerp(direction, point_direction(x, y, hx, hy), tracking_val2 * 0.3);
34
    }
35
};
36
37
image_xscale = 1;
38
image_yscale = 1;
39
scalefactor = 1;
40
alarm[0]