Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_ch3_teevie_spikes_Create_0

(view raw script w/o annotations or w/e)
1
spike_list = [];
2
max_scale = 0;
3
4
init_tiles = function(arg0)
5
{
6
    max_scale = arg0;
7
};
8
9
show_tiles = function()
10
{
11
    for (var i = 0; i < max_scale; i++)
12
    {
13
        spike_list[i][0] = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(x, y + (i * 40), spr_spiketile);
14
        spike_list[i][0].depth = depth - 10;
15
        spike_list[i][1] = instance_create(x, y + (i * 40), obj_solidblocksized);
16
    }
17
};
18
19
hide_tiles = function()
20
{
21
    if (array_length_1d(spike_list) == 0)
22
    {
23
        for (var i = 0; i < max_scale; i++)
24
        {
25
            spike_list[i][0] = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(x, y + (i * 40), spr_spiketile);
26
            spike_list[i][0].depth = depth - 10;
27
            spike_list[i][1] = instance_create(x, y + (i * 40), obj_solidblocksized);
28
        }
29
    }
30
    for (var i = 0; i < array_length_1d(spike_list); i++)
31
    {
32
        spike_list[i][0].image_index = 1;
33
        with (spike_list[i][1])
34
            instance_destroy();
35
    }
36
};