Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mike_cat_Collision_obj_hand_collision

(view raw script w/o annotations or w/e)
1
if (action < 4)
2
{
3
    sprite_index = spr_mike_cat_dance;
4
    image_blend = c_white;
5
    image_speed = 1;
6
    image_index = 0;
7
    speed = 0;
8
    meow = snd_play(snd_meow);
9
    sound_pitch(meow, random_range(0.5, 1.5));
10
    
scr_doom
scr_doom

function
scr_doom(arg0 = id, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; persistent = arg0.persistent; } }
(self, 30);
11
    
scr_sparkle
scr_sparkle

function
scr_sparkle(arg0)
{ var num = arg0; dir = irandom(360); for (i = 0; i < num; i++) { var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle); _ob.speed = 4; _ob.direction = (i / num) * 360; } } function scr_sparkle_pos(arg0, arg1, arg2) { var num = arg0; dir = irandom(360); for (i = 0; i < num; i++) { var _ob = instance_create_depth(arg1 + lengthdir_x(16, dir + ((i / num) * 360)), arg2 + lengthdir_y(16, dir + ((i / num) * 360)), depth - 1, obj_heart_sparkle); _ob.speed = 4; _ob.direction = (i / num) * 360; } } function scr_sparkle_colour(arg0, arg1) { var num = arg0; dir = 0; for (i = 0; i < num; i++) { var _ob = instance_create_depth(x + lengthdir_x(16, dir + ((i / num) * 360)), y + lengthdir_y(16, dir + ((i / num) * 360)), depth - 5, obj_heart_sparkle); _ob.speed = 4; _ob.direction = (i / num) * 360; _ob.image_blend = arg1; } } function scr_sparkle_random(arg0) { var num = arg0; dir = irandom(360); for (i = 0; i < num; i++) { with (instance_create_depth(x + lengthdir_x(16, (i / num) * 360), y + lengthdir_y(16, (i / num) * 360), depth - 1, obj_heart_sparkle)) motion_set(other.dir, irandom_range(4, 6)); dir += irandom(30); } }
(8);
12
    with (obj_mike_minigame_controller)
13
    {
14
        myscore += 10;
15
        other.image_alpha = 0.25;
16
        var _a = instance_create(other.x, other.y, obj_gravity_text);
17
        _a.str = "10";
18
    }
19
    action = 4;
20
    active = false;
21
}