Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_sethglasses_miniboss_Step_2

related scripts: CleanUp_0Collision_obj_plat_enm_smallgloveCollision_obj_plat_susieaxe_hbxCreate_0Draw_0Other_20PreCreate_0Step_0Step_2

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (con >= 1 && con < 10)
3
    image_angle = lerp(image_angle, 0.5 * (((85 - right_handle_angle) + left_handle_angle) - 85), min(1, lerptimer));
4
if (con < 100)
5
{
6
    with (ral_hook_left)
7
    {
8
        if (instance_exists(_act))
9
        {
10
            image_xscale = other.image_xscale;
11
            image_yscale = other.image_yscale;
12
            if (ralsei_ready)
13
            {
14
                if (other.con <= 1 || other.con == 10)
15
                {
16
                    with (other)
17
                    {
18
                        recovertimer = 0;
19
                        animate(anim_lefthandle_down);
20
                        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("auraalph", auraalph, 0, 15);
21
                    }
22
                }
23
            }
24
            active = other.con == 1 && other.anim_phase < 0 && other.bullet_pattern_endstate == 0;
25
            _act.active = active;
26
            _act.blocked = other.con >= 10;
27
            x = other.x + lengthdir_x((-other.sprite_width * 0.5) + 8, other.image_angle);
28
            y = other.y + lengthdir_y((-other.sprite_width * 0.5) + 8, other.image_angle);
29
            image_angle = other.left_handle_angle + other.image_angle;
30
            image_alpha = other.imagealpha;
31
            image_index = active;
32
            xoffset = lengthdir_x(50, image_angle);
33
            hang_xoffset = xoffset;
34
            newx = x + hang_xoffset;
35
            yoffset = lengthdir_y(50, image_angle);
36
            hang_yoffset = yoffset;
37
            newy = y + hang_yoffset;
38
        }
39
    }
40
    with (ral_hook_right)
41
    {
42
        if (instance_exists(_act))
43
        {
44
            image_xscale = -other.image_xscale;
45
            image_yscale = other.image_yscale;
46
            if (ralsei_ready)
47
            {
48
                if (other.con <= 1 || other.con == 10)
49
                {
50
                    with (other)
51
                    {
52
                        recovertimer = 0;
53
                        animate(anim_righthandle_down);
54
                        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("auraalph", auraalph, 0, 15);
55
                    }
56
                }
57
            }
58
            active = other.con == 1 && other.anim_phase < 0 && other.bullet_pattern_endstate == 0;
59
            _act.active = active;
60
            _act.blocked = other.con >= 10;
61
            x = other.x + lengthdir_x((other.sprite_width * 0.5) - 8, other.image_angle);
62
            y = other.y + lengthdir_y((other.sprite_width * 0.5) - 8, other.image_angle);
63
            image_angle = -other.right_handle_angle + other.image_angle;
64
            image_alpha = other.imagealpha;
65
            image_index = active;
66
            xoffset = lengthdir_x(50, image_angle);
67
            hang_xoffset = -xoffset;
68
            newx = x + hang_xoffset;
69
            yoffset = lengthdir_y(50, image_angle);
70
            hang_yoffset = -yoffset;
71
            newy = y + hang_yoffset;
72
        }
73
    }
74
}
75
if ((con >= 9 && image_angle == 0) || con >= 99)
76
    exit;
77
var bifurcate = ds_list_create();
78
left_lens_hitbox.image_angle = image_angle;
79
right_lens_hitbox.image_angle = image_angle;
80
left_lens_hitbox.x = x - lengthdir_x(92, image_angle);
81
left_lens_hitbox.y = y - lengthdir_y(92, image_angle);
82
bifurcate_hitbox.x = x - lengthdir_x(92, image_angle);
83
bifurcate_hitbox.y = y - lengthdir_y(92, image_angle);
84
bifurcate_hitbox.image_angle = image_angle;
85
with (bifurcate_hitbox)
86
    instance_place_list(x, y, 38, bifurcate, false);
87
for (var i = 0; i < ds_list_size(bifurcate); i++)
88
{
89
    left_lens_opacity = 0.2;
90
    var elem = ds_list_find_value(bifurcate, i);
91
    refract_bullet(elem, lefthp);
92
}
93
ds_list_clear(bifurcate);
94
right_lens_hitbox.x = x + lengthdir_x(92, image_angle);
95
right_lens_hitbox.y = y + lengthdir_y(92, image_angle);
96
bifurcate_hitbox.x = x + lengthdir_x(92, image_angle);
97
bifurcate_hitbox.y = y + lengthdir_y(92, image_angle);
98
bifurcate_hitbox.image_angle = image_angle;
99
with (bifurcate_hitbox)
100
    instance_place_list(x, y, 38, bifurcate, false);
101
for (var i = 0; i < ds_list_size(bifurcate); i++)
102
{
103
    var elem = ds_list_find_value(bifurcate, i);
104
    right_lens_opacity = 0.2;
105
    refract_bullet(elem, righthp);
106
}