Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_sethglasses_miniboss_Collision_obj_plat_susieaxe_hbx

related scripts: CleanUp_0Collision_obj_plat_enm_smallgloveCollision_obj_plat_susieaxe_hbx Create_0Draw_0Other_20PreCreate_0Step_0Step_2

(view raw script w/o annotations or w/e)
1
if (hit <= 0)
2
{
3
    hit = 3;
4
    if (bullet_pattern_dialogue_state == 0)
5
    {
6
        bullet_pattern_dialogue_state = 1;
7
        talkcon = 10;
8
        event_user(10);
9
    }
10
    with (other.owner)
11
        do_hitstop(2);
12
    
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; }
(x, y, 8, 16777215, 50, 15, 20, depth - 1, undefined, undefined, undefined, 0, undefined, undefined, 2, false);
13
    with (other)
14
        instance_destroy();
15
    if (lefthp > 0)
16
        left_lens_opacity = 1;
17
    if (righthp > 0)
18
        right_lens_opacity = 1;
19
    lefthp = max(0, lefthp - 1);
20
    righthp = max(0, righthp - 1);
21
    spawn_hit_petals(8, point_direction(other.x, other.y, x, y), 1);
22
    if (con == 0)
23
        animate(anim_dragdown);
24
    var hp_thereshold_reached = false;
25
    if (remaining_combo > 0)
26
    {
27
        remaining_combo = 0;
28
        hp_thereshold_reached = false;
29
        snd_play(snd_metalhit, 1, 2 - (remaining_combo / remaining_combo_max));
30
        if (remaining_combo == 0)
31
        {
32
            hp_thereshold_reached = true;
33
            hp = floor(hp / 20) * 20;
34
            lefthp = floor(0.5 * hp);
35
            righthp = floor(0.5 * hp);
36
            snd_play(snd_ultraswing);
37
            snd_play(snd_glassbreak);
38
            snd_play(snd_punchheavythunder, 0.6, 1.3);
39
            scr_plat_cool_zoom();
40
        }
41
    }
42
    hp = lefthp + righthp;
43
    if (hp_thereshold_reached && bullet_pattern_endstate == 0 && i_ex(obj_dw_cliff_seth_miniboss))
44
    {
45
        conreturntimer = 999;
46
        if (lefthp > 29)
47
            lefthp = 29;
48
        if (righthp > 29)
49
            righthp = 29;
50
        if (hp <= 40 && eligible_for_standing_ending)
51
        {
52
            bullet_pattern_endstate = 1;
53
            bullet_pattern_can_expire = false;
54
            with (obj_dw_cliff_seth_miniboss)
55
                do_standing_combo_ending(other);
56
        }
57
        else
58
        {
59
            hp = lefthp + righthp;
60
            snd_stop(snd_glassbreak);
61
            snd_play(snd_glassbreak);
62
            animate(anim_recover);
63
        }
64
    }
65
    if (hp <= 0)
66
    {
67
        audio_stop_sound(snd_enemy_defeat_quick);
68
        snd_play(snd_enemy_defeat_quick);
69
        
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
70
        con = 99;
71
        timer = 0;
72
        current_animation = -4;
73
    }
74
}