Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_yellow_miniboss_Step_2

related scripts: Collision_obj_plat_enm_smallgloveCollision_obj_plat_playerCollision_obj_plat_susieaxe_hbxCreate_0Destroy_0Draw_0Draw_72Other_19Other_4PreCreate_0Step_0Step_2

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (global.pause_plat)
3
    exit;
4
with (ral_hook)
5
{
6
    if (other.con != 4 && other.con != 5 && other.con != 6)
7
        hookscale = 
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; }
(hookscale, 0, 0.1);
8
    else
9
        hookscale = 
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; }
(hookscale, 1, 0.1);
10
    image_xscale = other.image_xscale * hookscale;
11
    image_yscale = other.image_yscale * hookscale;
12
    if (ralsei_ready)
13
    {
14
        if (other.con < 5)
15
        {
16
            with (other)
17
            {
18
                con = 5;
19
                contimer = 0;
20
                clear_targets();
21
            }
22
        }
23
    }
24
    if (hookscale < 1)
25
        _act.blocked = 2;
26
    else
27
        _act.blocked = 0;
28
    x = other.x;
29
    y = other.y;
30
    image_angle = other.image_angle;
31
    image_alpha = other.image_alpha;
32
    depth = other.depth + 1;
33
    var ang = image_angle - 90;
34
    var pointdir = point_direction(0, 0, -10, 40) + image_angle;
35
    var pointdist = point_distance(0, 0, -10, 40);
36
    xoffset = 10 + lengthdir_x(pointdist, pointdir);
37
    hang_xoffset = xoffset;
38
    newx = x + hang_xoffset;
39
    yoffset = -5 + lengthdir_y(pointdist, pointdir);
40
    hang_yoffset = yoffset;
41
    newy = y + hang_yoffset;
42
}
43
if (con == 8)
44
{
45
}