Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_yellow_miniboss_Create_0

related scripts: Collision_obj_plat_enm_smallgloveCollision_obj_plat_playerCollision_obj_plat_susieaxe_hbxCreate_0 Destroy_0Draw_0Draw_72Other_19Other_4PreCreate_0Step_0Step_2

(view raw script w/o annotations or w/e)
1
event_inherited();
2
difficulty = 0;
3
hspeed = 3;
4
hp = 80;
5
aim = 0;
6
aim_error = 0;
7
x_home = xstart;
8
y_home = ystart;
9
last_bbl = 0;
10
last_bbr = 0;
11
last_bbt = 0;
12
last_bbb = 0;
13
last_bbc = 0;
14
coindrops = 30;
15
size = 3;
16
u_alpha = shader_get_uniform(shd_chromatic_reflection, "iAlpha");
17
u_patternangle = shader_get_uniform(shd_chromatic_reflection, "iPatternAngle");
18
u_patterncount = shader_get_uniform(shd_chromatic_reflection, "iPatternCount");
19
u_holoangle = shader_get_uniform(shd_chromatic_reflection, "iHoloAngle");
20
u_time = shader_get_uniform(shd_chromatic_reflection, "iTime");
21
despawn_timer = 0;
22
target_angle = 0;
23
talkcon = -1;
24
attacking = false;
25
my_camzone = -4;
26
con = 0;
27
contimer = 0;
28
attacktimer = -1;
29
hit = 0;
30
image_speed = 0.25;
31
gtime = 10;
32
windimmune = true;
33
contact_damage = 0;
34
image_speed = 0;
35
rotation_speed = 3;
36
rotation_speed_target = 3;
37
rotation_flip = 1;
38
last_psi = 0;
39
stored_speed = 0;
40
attackstyle = 0;
41
shaketimer = 0;
42
assist_enemy = -4;
43
is_buffed = false;
44
buff_timer = 0;
45
_remx = 0;
46
_remy = 0;
47
init = 0;
48
position_index = 0;
49
attackvolley = 0;
50
remaining_combo = 0;
51
remaining_combo_max = 6;
52
if (simple)
53
{
54
    con = 2;
55
    hspeed = 0;
56
}
57
su_act.blocked = true;
58
59
clear_targets = function()
60
{
61
    for (var i = 0; i < array_length(targetlist); i++)
62
    {
63
        with (targetlist[i])
64
            instance_destroy();
65
    }
66
    targetlist = [];
67
};
68
69
spawn_cakesmoke = function(arg0)
70
{
71
    var xx = x + lengthdir_x(88, image_angle);
72
    var yy = y + lengthdir_y(88, image_angle);
73
    var amp = 1;
74
    var dist = 50;
75
    var xxx = xx + lengthdir_x(dist, image_angle);
76
    var yyy = yy + lengthdir_y(dist, image_angle);
77
    var smoke = instance_create(xxx, yyy, obj_animation);
78
    with (smoke)
79
    {
80
        depth = other.depth + 15;
81
        sprite_index = spr_poof_gun;
82
        image_speed = 0.5;
83
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
84
        image_angle = point_direction(other.x, other.y, x, y) - 90;
85
    }
86
    if (turnstun > -6)
87
        amp = 2;
88
    repeat (arg0)
89
    {
90
        dist = random_range(-40, 40);
91
        xxx = xx + lengthdir_y(dist, image_angle);
92
        yyy = yy + lengthdir_x(dist, image_angle);
93
        smoke = instance_create(xxx, yyy, obj_marker);
94
        with (smoke)
95
        {
96
            depth = other.depth + 10;
97
            sprite_index = spr_cakesmoke;
98
            
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
99
            direction = point_direction(other.x, other.y, x, y) + (random_range(-12, 12) * amp);
100
            speed = random_range(6, 12) * amp;
101
            friction = 0.3 + (0.2 * amp);
102
            gravity = -0.3;
103
            image_angle = random_range(0, 360);
104
            
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; }
("image_alpha", 1, 0, random_range(30, 60));
105
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] target = arg0; } return _doom; }
(self, 60);
106
        }
107
    }
108
};
109
110
cam_min_x = 0;
111
cam_max_x = 0;
112
113
on_flower_ruined = function()
114
{
115
    if (con == 0)
116
    {
117
        con = 1;
118
        contimer = 0;
119
        var psi = position_index;
120
        vspeed = 0;
121
        hspeed = 0;
122
        paused_spd = 0;
123
        snd_play(snd_b);
124
        scr_plat_barrier_enable();
125
        var nearest = -4;
126
        var neardist = 0;
127
        with (obj_plat_camera)
128
        {
129
            cutscene = 1;
130
            with (obj_genmarker)
131
            {
132
                if (string_pos("camera", extflag) > 0)
133
                {
134
                    if (nearest == -4 || abs(x - other.x) < neardist)
135
                    {
136
                        nearest = self;
137
                        neardist = abs(x - other.x);
138
                    }
139
                }
140
            }
141
            if (nearest.extflag == "camera3")
142
                other.position_index = 2;
143
            if (nearest.extflag == "camera2")
144
                other.position_index = 1;
145
            
scr_pan_lerp
scr_pan_lerp

function
scr_pan_lerp(arg0, arg1, arg2)
{ panner = instance_create(arg0, arg1, obj_panner); panner.panmax = arg2; panner.type = 1; }
(nearest.x - 320, nearest.y, 30);
146
            snd_free(global.currentsong[0]);
147
            
scr_musicer
scr_musicer

function
scr_musicer(arg0 = "dogcheck.ogg", arg1 = 0.7, arg2 = 1, arg3 = 0, arg4 = -1)
{ var musicer = instance_create_depth(0, 0, 0, obj_musicer_gen); musicer.song = arg0; musicer.volume = arg1; musicer.pitch = arg2; musicer.delay = arg3; musicer.fadein = arg4; return musicer; }
("rudebuster_boss.ogg", undefined, undefined, undefined, 5);
148
        }
149
    }
150
};
151
152
targetlist = [];
153
154
apply_buff = function()
155
{
156
    is_buffed = true;
157
    buff_timer = 0;
158
    var snd = snd_play(snd_power, 1, 0.2);
159
    snd_pitch_time(snd, 0.7, 50);
160
    var _of = 
scr_oflash
scr_oflash

function
scr_oflash()
{ _oflash = instance_create(x, y, obj_oflash); _oflash.image_xscale = image_xscale; _oflash.image_speed = 0; _oflash.image_angle = image_angle; _oflash.image_index = image_index; _oflash.image_yscale = image_yscale; _oflash.sprite_index = sprite_index; _oflash.depth = depth - 1; _oflash.target = id; return _oflash; }
();
161
    _of.flashcolor = c_red;
162
    for (var i = 0; i < 9; i++)
163
    {
164
        var star = instance_create(x + lengthdir_x(45, i * 40), y + lengthdir_y(45, i * 40), obj_marker);
165
        with (star)
166
        {
167
            image_angle = random(360);
168
            depth = other.depth - 10;
169
            image_xscale = 2;
170
            image_yscale = 2;
171
            image_alpha = 2;
172
            image_speed = 0.25;
173
            direction = point_direction(other.x, other.y, x, y);
174
            speed = 6;
175
            friction = 0.2;
176
            sprite_index = spr_sparestar_anim;
177
            image_blend = c_orange;
178
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] target = arg0; } return _doom; }
(self, 30);
179
            
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; }
("image_alpha", image_alpha, 0, 30, 1, "out");
180
        }
181
    }
182
};
183
184
auraalph = 1;
185
turnstun = 0;
186
ral_hook = instance_create(x, y, obj_ralsei_hook);
187
ral_hook.owner = self;
188
with (ral_hook)
189
{
190
    hookscale = 0;
191
    sprite_index = other.sprite_index;
192
    depth = other.depth + 1;
193
    image_index = 1;
194
    image_speed = 0;
195
    menu_name = stringsetloc(
Trigger
"Trigger", "obj_plat_enm_yellow_miniboss_slash_Create_0_gml_196_0"
);
196
    image_angle = other.image_angle;
197
    image_xscale = other.image_xscale;
198
    image_yscale = other.image_yscale;
199
    can_cut_down = false;
200
}
201
petal_color = 65535;
202
203
get_hurt = function()
204
{
205
};