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