Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_plat_enm_book_simple_Collision_obj_plat_player

related scripts: Alarm_0Collision_obj_plat_player Create_0Destroy_0Step_0

(view raw script w/o annotations or w/e)
1
if (!other.hurt && !other.targetmode && !other.invincible && other.sprite_index != spr_kris_plat_slash_ground && other.sprite_index != spr_kris_plat_slash_air)
2
{
3
    snd_play(snd_punchmed);
4
    with (other)
5
    {
6
        do_kb = true;
7
        hurt_type = 1;
8
        var hk = (6 * sign(x - other.x)) + (0.9 * other.hspeed);
9
        var vk = min(-4, -4 + (other.vspeed * 0.9));
10
        get_hurt(20, hk, vk, other.damage);
11
        do_hitstop(4);
12
        with (
scr_plat_vfx
scr_plat_vfx

function
scr_plat_vfx(arg0)
{ var _vfx = instance_create_depth(x, y, depth, obj_plat_vfx); _vfx.sprite_index = arg0; return _vfx; } function scr_vfx_above(arg0) { var _vfx = instance_create_depth(x, y, depth - 1, obj_plat_vfx); _vfx.sprite_index = arg0; return _vfx; } function scr_plat_vfx_ringhit(arg0, arg1, arg2, arg3) {
scr_make_ripple(arg0, arg1, 80, arg3, 280, 2, 20, depth, 0, 0, 0, 1, 0.8);
scr_make_ripple(arg0, arg1, 120, arg3, 480, 2, 15, depth, 0, 0, 0, 1, 0.8);
scr_make_ripple(arg0, arg1, 160, arg3, 680, 2, 10, depth, 0, 0, 0, 1, 0.8);
repeat (7) { with (instance_create(arg0, arg1, obj_animation)) { sprite_index = spr_plat_impact_splash; direction = random_range(0, 360); speed = random_range(3, 12); friction = 0.8; image_speed = 0.3; image_angle = direction;
scr_darksize();
image_blend = arg3; } } }
(7342))
13
        {
14
            image_xscale = choose(1, -1);
15
            image_yscale = choose(1, -1);
16
            image_angle = choose(0, 90, 180, 270);
17
        }
18
    }
19
}