Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_yellow_punishmentgun_Step_0

related scripts: CleanUp_0Collision_obj_plat_playerCollision_obj_plat_susieaxe_hbxCreate_0Destroy_0Draw_0Draw_72Other_20Other_4Step_0 Step_2

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (global.pause_plat)
3
{
4
    
scr_pause_alarms
scr_pause_alarms

function
scr_pause_alarms(arg0 = 11)
{ for (i = 0; i <= arg0; i++) { if (alarm[i] != -1 && alarm[i] != 0) alarm[i]++; } }
();
5
    exit;
6
}
7
if (killed)
8
{
9
    su_act.blocked = killed;
10
    phase = 999;
11
    orbsize = 
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; }
(orbsize, 0, 0.1);
12
    exit;
13
}
14
if (!can_attack)
15
    exit;
16
if (!init && 
scr_onscreen
scr_onscreen

function
scr_onscreen(arg0)
{ __obj = arg0; var __cx = camera_get_view_x(view_camera[0]); var __cy = camera_get_view_y(view_camera[0]); if ((__obj.x + __obj.sprite_width) < __cx || __obj.x > (__cx + 640) || (__obj.y + __obj.sprite_height) < __cy || __obj.y > (__cy + 480)) return false; else return true; }
(self))
17
    init = true;
18
if (is_stunned)
19
{
20
    if (stun_timer < (stun_duration - 10))
21
        y = 
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; }
(y, ystart + 176, 10);
22
    else
23
        y = 
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; }
(y, ystart + 100, 10);
24
}
25
if (!killed && collision_circle(x, y, 20 * image_xscale, obj_plat_hbx, false, true))
26
{
27
    with (obj_plat_hbx)
28
    {
29
        if (!hit_check(other.id))
30
            exit;
31
    }
32
    if (hp == maxhp)
33
    {
34
        with (obj_plat_enm_yellow_punishmentgun)
35
        {
36
            talkcon = 3;
37
            event_user(10);
38
        }
39
    }
40
    hp--;
41
    hit = 1;
42
    shake = 4;
43
    var fx_anchor_x = x - lengthdir_x(60, image_angle);
44
    var fx_anchor_y = y - lengthdir_y(60, image_angle);
45
    var pitch = 0.6 + ((hp / maxhp) * 0.3);
46
    with (obj_plat_hbx)
47
    {
48
        snd_play(snd_metal_hit_strong, 1, 1.1);
49
        snd_play(snd_playablebell, 0.3, pitch + 1);
50
        snd_play(snd_playablebell, 0.6, pitch);
51
        do_hbx_hit(-4, 0);
52
    }
53
    with (instance_create_depth(x, y, depth - 1, obj_plat_vfx))
54
    {
55
        sprite_index = spr_hit_vfx;
56
        image_speed = 1;
57
    }
58
    var dir = 90 - (90 * sign(obj_plat_player.image_xscale));
59
    if (movetype == 0)
60
        hit_angle_speed = 6 * sign(obj_plat_player.image_xscale);
61
    var hitamt = 5;
62
    if (hp <= 0 || (image_index < 5 && hp <= next_phase_hp[image_index]))
63
        hitamt = 12;
64
    repeat (hitamt)
65
    {
66
        sparks_particle_system.x = fx_anchor_x;
67
        sparks_particle_system.y = fx_anchor_y;
68
        sparks_particle_system.depth = depth + 2;
69
        var speedval = (random_range(1, 1.5) * hitamt) + 4;
70
        var dirval = random_range(135, 405);
71
        sparks_particle_struct.hspeed = lengthdir_x(speedval, dirval);
72
        sparks_particle_struct.vspeed = lengthdir_y(speedval, dirval);
73
        sparks_particle_struct.image_blend = merge_color(c_black, merge_color(c_orange, c_yellow, random_range(0, 1)), 0.5);
74
        var scale = random_range(1, 2);
75
        sparks_particle_struct.image_xscale = scale;
76
        sparks_particle_struct.image_yscale = scale;
77
        sparks_particle_system.emit(sparks_particle_struct);
78
    }
79
    if (hp <= 0 || (image_index < 5 && hp <= next_phase_hp[image_index]))
80
    {
81
        if (image_index < 5)
82
            image_index++;
83
        shake = 20;
84
        stun_timer = max(stun_timer, stun_duration - 11);
85
        
scr_plat_hitstop_global
scr_plat_hitstop_global

function
scr_plat_hitstop_global(arg0)
{ with (obj_plat_game) hitstop = max(arg0, hitstop); }
(8);
86
        snd_stop(snd_punchmed);
87
        snd_play(snd_whack_absurdlyloud, 0.25, 1);
88
        snd_play(snd_ultraswing, 1, 2);
89
        snd_play(snd_playablebell, 1, pitch + 2);
90
        snd_play(snd_playablebell, 0.6, pitch * 0.5);
91
        with (instance_create(lerp(x, obj_plat_player.x, 0.5), lerp(y, obj_plat_player.y, 0.5), obj_vfx_parry))
92
        {
93
            image_angle = 45;
94
            image_blend = c_white;
95
        }
96
        
scr_make_ripple
scr_make_ripple

function
scr_make_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0, arg12 = 1, arg13 = 0, arg14 = 0, arg15 = true)
{ var _ripple = -4; var _found = false; if (instance_exists(obj_ripples)) { with (obj_ripples) { if (depth == arg7) { _found = true; _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } } if (!_found) { with (instance_create_depth(0, 0, arg7, obj_ripples)) { _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } return _ripple; }
(fx_anchor_x, fx_anchor_y, 30, 65535, 200, 8, 24, depth + 1, undefined, undefined, undefined, undefined, undefined, 1, 2, true);
97
        
scr_make_ripple
scr_make_ripple

function
scr_make_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0, arg12 = 1, arg13 = 0, arg14 = 0, arg15 = true)
{ var _ripple = -4; var _found = false; if (instance_exists(obj_ripples)) { with (obj_ripples) { if (depth == arg7) { _found = true; _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } } if (!_found) { with (instance_create_depth(0, 0, arg7, obj_ripples)) { _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } return _ripple; }
(fx_anchor_x, fx_anchor_y, 60, 65535, 400, 8, 16, depth + 1, undefined, undefined, undefined, undefined, undefined, 1, 2, true);
98
        chunks_particle_system.depth = depth + 2;
99
        chunks_particle_system.shader2_greyscale_fade = hp / maxhp;
100
        repeat (6)
101
        {
102
            chunks_particle_system.x = x + random_range(-40, 40);
103
            chunks_particle_system.y = y + random_range(-40, 40);
104
            chunks_particle_struct.image_index = choose(1, 2);
105
            var spd = random_range(16, 18);
106
            dir = random_range(135, 405);
107
            chunks_particle_struct.hspeed = lengthdir_x(spd, dir);
108
            chunks_particle_struct.vspeed = lengthdir_y(spd, dir);
109
            chunks_particle_system.emit(chunks_particle_struct);
110
        }
111
        hit_angle_speed *= 2;
112
        if (phase < 5)
113
        {
114
            phase++;
115
            on_phase_change(phase);
116
        }
117
    }
118
    else
119
    {
120
        
scr_plat_hitstop_global
scr_plat_hitstop_global

function
scr_plat_hitstop_global(arg0)
{ with (obj_plat_game) hitstop = max(arg0, hitstop); }
(4);
121
        
scr_make_ripple
scr_make_ripple

function
scr_make_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0, arg12 = 1, arg13 = 0, arg14 = 0, arg15 = true)
{ var _ripple = -4; var _found = false; if (instance_exists(obj_ripples)) { with (obj_ripples) { if (depth == arg7) { _found = true; _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } } if (!_found) { with (instance_create_depth(0, 0, arg7, obj_ripples)) { _ripple = MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11, arg12, arg13, arg14, arg15); blend = arg13; } } return _ripple; }
(fx_anchor_x, fx_anchor_y, 30, 65535, 150, 8, 16, depth + 1, undefined, undefined, undefined, undefined, undefined, 1, 2, true);
122
    }
123
    if (hp <= 0)
124
    {
125
        stun_timer = max(stun_timer, stun_duration - 11);
126
        killed = true;
127
        spawn_death_coins();
128
        scr_plat_cool_zoom();
129
        if (chargesound != -4)
130
            snd_stop(chargesound);
131
        exit;
132
    }
133
}
134
var last_fx_timer = floor(fx_timer);
135
fx_timer += (charge_fx_speed * 0.2);
136
if (floor(fx_timer) > last_fx_timer)
137
    spawn_charge_effects();
138
hit_angle_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; }
(hit_angle_speed, 0, abs(0.2 * hit_angle_speed) + 0.1);
139
hit_angle_offset += hit_angle_speed;
140
hit_angle_offset = 
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; }
(hit_angle_offset, 0, clamp(2 - abs(hit_angle_speed), 0, 2));
141
if (hit > 0)
142
    exit;
143
charge_fx_speed = (0.065 * (phase * phase)) + 0.2;
144
if (con == 0)
145
{
146
    if (chargesound == -4)
147
    {
148
        chargesound = snd_loop(snd_chargeshot_charge);
149
        snd_volume(chargesound, 0.15, 0);
150
        snd_pitch(chargesound, 0.2);
151
    }
152
    else
153
    {
154
        snd_volume(chargesound, lerp(0.15, 0.5, charge_seconds / charge_maxseconds), 0);
155
        snd_pitch(chargesound, lerp(0.2, 1.2, ease_in_quad(charge_seconds / charge_maxseconds, 0, 1, 1)));
156
    }
157
    orbsize = (charge_seconds / charge_maxseconds) * 2;
158
    var last_seconds = charge_seconds;
159
    charge_seconds += (1/30);
160
    if (floor(charge_seconds * 3.33333) > floor(last_seconds * 3.33333))
161
    {
162
        var x_offset = 0;
163
        if (global.lang == "ja")
164
            x_offset = 30;
165
        var meter_bar_x = camerax() + 60 + 62 + x_offset;
166
        var meter_bar_y = cameray() + 30 + 2;
167
        with (obj_plat_punishmentgun_ui)
168
        {
169
            with (instance_create(meter_bar_x, meter_bar_y, obj_marker))
170
            {
171
                sprite_index = spr_pxwhite;
172
                hspeed = 2;
173
                depth = other.depth - 1;
174
                image_blend = c_yellow;
175
                image_xscale = 2;
176
                image_yscale = 18;
177
                
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_xscale", image_xscale, 40, 30).respect_plat_pause = false;
178
                
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, 28).respect_plat_pause = false;
179
                
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] = arg1; target = arg0; } return _doom; }
(self, 30).respects_platmode = false;
180
            }
181
        }
182
    }
183
    if (talkcon < 1 && charge_seconds >= 6)
184
    {
185
        talkcon = 1;
186
        event_user(10);
187
    }
188
    if (talkcon < 2 && charge_seconds >= 12)
189
    {
190
        talkcon = 2;
191
        event_user(10);
192
    }
193
    auraalph = ((charge_seconds / charge_maxseconds) - 0.5) * 2;
194
    if (charge_seconds >= charge_maxseconds)
195
    {
196
        con = 1;
197
        contimer = 0;
198
    }
199
    if (phase < 5 && charge_seconds > (charge_maxseconds - 10))
200
    {
201
        phase = 5;
202
        on_phase_change(phase);
203
    }
204
}
205
contimer++;
206
if (phase == 5)
207
    shake = max(shake, 2);
208
if (con == 1)
209
{
210
    orbsize = 
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; }
(orbsize, 0, 0.2);
211
    x = lerp(x, xstart, 0.1);
212
    with (obj_dw_fcastle_yellow_combat)
213
        gun_moves = false;
214
    laser_width = contimer / 30;
215
    if (contimer == 10)
216
    {
217
        snd_play(snd_rocket);
218
        scr_lerpcol("image_blend", 16777215, 255, 20);
219
        var xx = x;
220
        var yy = y + (56 * image_yscale);
221
        var xmove = x - xstart;
222
        with (obj_plat_player)
223
            act_enabled = false;
224
        with (instance_create(xx, yy, obj_marker))
225
        {
226
            depth = other.depth - 100;
227
            sprite_index = spr_vfx_parry_ring;
228
            image_xscale = 2;
229
            image_yscale = 2;
230
            image_alpha = 0;
231
            image_blend = c_yellow;
232
            image_angle = random_range(0, 360);
233
            
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_xscale", image_xscale, 0, 20, 1, "in");
234
            
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_yscale", image_yscale, 0, 20, 1, "in");
235
            
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", 0, 1, 20);
236
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] = arg1; target = arg0; } return _doom; }
(self, 20);
237
        }
238
    }
239
    if (contimer == 30)
240
    {
241
        if (chargesound != -4)
242
            snd_stop(chargesound);
243
        laser_timer = 1;
244
        
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; }
("y", y, y - 100, 1, "out");
245
        with (obj_plat_camera)
246
            shakey = 24;
247
        with (instance_create(0, 0, obj_marker))
248
        {
249
            sprite_index = spr_pxwhite;
250
            image_xscale = room_width;
251
            image_yscale = room_height;
252
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ var _doom = instance_create_depth(0, 0, 0, obj_doom); with (_doom) { alarm[0] = arg1; target = arg0; } return _doom; }
(self, 24);
253
            image_alpha = 0.2;
254
            
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, 24);
255
        }
256
        snd_play(snd_punchheavythunder);
257
        snd_play(snd_whack_absurdlyloud, 0.2, 0.4);
258
        con = 2;
259
        with (obj_slashpusher)
260
        {
261
            if (draw_yellow)
262
                yellow_index = 6;
263
        }
264
    }
265
}
266
if (con == 0)
267
{
268
    if (instance_exists(obj_plat_playerheart))
269
    {
270
        if (!player_hurt && obj_plat_playerheart.hurt)
271
        {
272
            hurt_counter++;
273
            if (hurt_counter == 1)
274
            {
275
                talkcon = 20;
276
                event_user(10);
277
            }
278
            if (hurt_counter == 5)
279
            {
280
                talkcon = 21;
281
                event_user(10);
282
            }
283
            if (hurt_counter == 10)
284
            {
285
                with (obj_dw_fcastle_yellow_combat)
286
                    hurt_too_much();
287
                con = 3;
288
            }
289
        }
290
        player_hurt = obj_plat_playerheart.hurt;
291
    }
292
}
293
if (con == 0 || (con == 1 && contimer < 10))
294
{
295
    for (var i = 0; i < array_length(orbs); i++)
296
    {
297
        if (instance_exists(orbs[i]))
298
        {
299
            orbs[i].x += x - lastx;
300
            orbs[i].y += y - lasty;
301
        }
302
    }
303
    lastx = x;
304
    lasty = y;
305
    if ((contimer % floor(20 - (16 * (charge_seconds / charge_maxseconds)))) == 0)
306
    {
307
        var ang = random_range(image_angle - 45, image_angle + 45);
308
        var cx = x + lengthdir_x(46 * image_xscale, image_angle);
309
        var cy = y + lengthdir_y(46 * image_xscale, image_angle);
310
        var xx = cx + lengthdir_x(110, ang);
311
        var yy = cy - lengthdir_y(110, ang);
312
        var col = merge_color(c_orange, c_red, charge_fx_speed * 0.3);
313
        with (instance_create(xx, yy, obj_animation))
314
        {
315
            image_blend = col;
316
            depth = other.depth + 2;
317
            
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
318
            image_angle = point_direction(x, y, cx, cy);
319
            sprite_index = spr_plat_impact_splash;
320
            array_push(other.orbs, self);
321
        }
322
    }
323
}
324
if (laser_timer > 0 && con == 2)
325
{
326
    laser_timer++;
327
    laser_width = max(0, 1 - (laser_timer * laser_timer * 0.002));
328
    if (global.hp[global.char[0]] > 0)
329
    {
330
        global.tempflag[57] = 1;
331
        global.inv = 0;
332
        global.hp[global.char[0]] = 99;
333
        global.hp[global.char[1]] = 99;
334
        global.hp[global.char[2]] = 99;
335
        with (obj_plat_player)
336
            get_hurt(0, 0, 0, 999);
337
        global.hp[global.char[0]] = 0;
338
        global.hp[global.char[1]] = 0;
339
        global.hp[global.char[2]] = 0;
340
        with (obj_dmgwriter)
341
            damage = 999;
342
        with (obj_plat_player)
343
        {
344
            visible = 0;
345
            gravity = 0;
346
            entity_gravity = 0;
347
            vspeed = 0;
348
            hspeed = 0;
349
            with (instance_create(x, y, obj_marker))
350
            {
351
                sprite_index = spr_kris_plat_hurt_air;
352
                gravity = 1.25;
353
                hspeed = 18;
354
                image_yscale = 2;
355
                image_xscale = -2;
356
                if (x < (camerax() + 320))
357
                {
358
                    hspeed = -18;
359
                    image_xscale = 2;
360
                }
361
                vspeed = -26;
362
            }
363
        }
364
        with (obj_plat_playerheart)
365
            visible = 0;
366
        with (obj_plat_follower)
367
        {
368
            visible = 0;
369
            with (instance_create(x, y, obj_marker))
370
            {
371
                if (other.name == "ralsei")
372
                {
373
                    vspeed = -29;
374
                    sprite_index = spr_ralsei_hurt;
375
                }
376
                else
377
                {
378
                    sprite_index = spr_susie_shock;
379
                    vspeed = -22;
380
                }
381
                image_yscale = 2;
382
                gravity = 1.25;
383
                hspeed = 20;
384
                image_xscale = -2;
385
                if (x < (camerax() + 320))
386
                {
387
                    hspeed = -20;
388
                    image_xscale = 2;
389
                }
390
            }
391
        }
392
        scr_plat_cool_zoom();
393
        global.interact = 1;
394
    }
395
    if (laser_timer >= 90)
396
    {
397
        laser_timer = 0;
398
        con = 99;
399
        with (obj_dw_fcastle_yellow_combat)
400
            lose();
401
    }
402
}
403
su_act.newx = x - lengthdir_x(80, image_angle);
404
su_act.newy = y - lengthdir_y(80, image_angle);