Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_aqua_miniboss_Create_0

related scripts: Collision_obj_plat_enm_smallgloveCollision_obj_plat_susieaxe_hbxCreate_0 Destroy_0Draw_0PreCreate_0Step_0

(view raw script w/o annotations or w/e)
1
if (!regular_enemy)
2
{
3
    plat_name = stringsetloc(
Litebuster
"Litebuster", "obj_plat_enm_aqua_miniboss_slash_Create_0_gml_4_0"
);
4
    plat_desc = stringsetloc(
This'll deal some damage.
"This'll deal some damage.", "obj_plat_enm_aqua_miniboss_slash_Create_0_gml_5_0"
);
5
}
6
event_inherited();
7
throwsign = 1;
8
knives = 0;
9
hp = 9;
10
aim = 0;
11
aim_error = 0;
12
x_home = xstart;
13
y_home = ystart;
14
coindrops = 20;
15
if (regular_enemy)
16
{
17
    hp = 5;
18
    coindrops = 10;
19
}
20
attacking = false;
21
lerpinst[0] = -4;
22
nextlerp = 0;
23
targetlerp = [[0, 0, 15], [0, 1, 15], [1, 0, 15], [1, 1, 15]];
24
con = 0;
25
contimer = 0;
26
if (x < (camerax() + (0.5 * camerawidth())))
27
{
28
    nextlerp = 2;
29
    xstart = x + 320;
30
    con = 1;
31
}
32
if (anchor_x != -1)
33
{
34
    xstart = anchor_x;
35
    ystart = anchor_y;
36
}
37
remx = 0;
38
remy = 0;
39
attacktimer = -1;
40
nextknife = 0;
41
knifecount = 6;
42
throwdir = 1;
43
hit = 0;
44
image_speed = 0.25;
45
gtime = 10;
46
windimmune = true;
47
evadecon = 0;
48
evadetimer = 0;
49
evadedirection = 0;
50
reteleport_timer = 50;
51
petal_color = 16776960;
52
53
get_hurt = function(arg0)
54
{
55
    if (paused || custom_paused)
56
        exit;
57
    with (arg0)
58
    {
59
        if (!hit_check(other.id))
60
            exit;
61
    }
62
    hp--;
63
    hit = 1;
64
    cancel_stun();
65
    with (arg0)
66
        do_hbx_hit(-4, -1, 1.5 - ((0.5 * other.hp) / other.__max_hp));
67
    spawn_hit_petals(3, point_direction(arg0.x, arg0.y, x, y), 1);
68
    if ((hp % 3) == 0 && !regular_enemy)
69
    {
70
        if (hp > 0)
71
            
scr_afterimage_monochrome
scr_afterimage_monochrome

function
scr_afterimage_monochrome(arg0, arg1)
{ afterimage = instance_create(x, y, obj_afterimage_onecolor); afterimage.tint = arg0; afterimage.additive = arg1; afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; } function scr_afterimage_monochrome_parallax(arg0, arg1, arg2) { afterimage = instance_create(x, y, obj_afterimage_onecolor_parallax); afterimage.tint = arg0; afterimage.additive = arg1; afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; afterimage.parallax_depth = arg2; return afterimage; }
(16776960, true);
72
        instance_destroy();
73
    }
74
    else
75
    {
76
        evadecon = 1;
77
        evadetimer = 0;
78
        if (reteleport_timer < 0)
79
        {
80
            instance_destroy();
81
        }
82
        else
83
        {
84
            flash_hurt(255);
85
            evadedirection = sign(x - arg0.x);
86
            with (instance_create_depth(x, y, depth, obj_plat_vfx))
87
            {
88
                sprite_index = spr_hit_vfx;
89
                image_speed = 1;
90
            }
91
            with (instance_create_depth(x, y, depth, obj_plat_vfx))
92
            {
93
                sprite_index = spr_smokepuff;
94
                image_speed = 2;
95
            }
96
            if (hp <= 0)
97
                instance_destroy();
98
        }
99
    }
100
};