Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_mike_statue_cat_overworld_Create_0

(view raw script w/o annotations or w/e)
1
image_speed = 0;
2
statue_active = true;
3
con = 0;
4
callback = -4;
5
bit_index = 1;
6
statue = instance_create(x, y, obj_mike_statue_cat);
7
statue_block = instance_create(x + 10, y + 80, obj_solidblockDark);
8
statue_readable = instance_create(x + 8, y + 70, obj_readable_room1);
9
with (statue_readable)
10
{
11
    image_xscale = 2;
12
    image_yscale = 2;
13
}
14
15
init = function(arg0, arg1 = -4)
16
{
17
    statue_readable.extflag = arg0;
18
    callback = arg1;
19
    statue.sprite_index = sprite_index;
20
    statue_block.y = (y + (sprite_get_height(sprite_index) * 2)) - 40;
21
    statue_readable.y = (y + (sprite_get_height(sprite_index) * 2)) - 40;
22
    if (!scr_is_valid_mic_platform() && global.flag[1692] == 1)
23
    {
24
        with (statue_readable)
25
            instance_destroy();
26
    }
27
    with (statue)
28
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
29
};
30
31
clean_up = function()
32
{
33
    with (statue)
34
        instance_destroy();
35
    with (statue_block)
36
        instance_destroy();
37
    with (statue_readable)
38
        instance_destroy();
39
    if (callback != -4)
40
        callback(bit_index);
41
    instance_destroy();
42
};