Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkshape_centipede_head_Other_10

(view raw script w/o annotations or w/e)
1
var point_to = id;
2
for (var a = 0; a < segment_max; a++)
3
{
4
    with (instance_create(x, y, obj_darkshape_centipede_segment))
5
    {
6
        guide = point_to;
7
        master = other.id;
8
        point_to = id;
9
        ds_list_add(other.segment_list, id);
10
        segment_distance = other.segment_distance;
11
        if (a == (other.segment_max - 1))
12
        {
13
            sprite_index = spr_darkshape_directed_tail_animated;
14
            shrink_sprite = spr_darkshape_directed_tail;
15
        }
16
        scalefactor = 0.9 - (0.05 * a);
17
        image_xscale = 0.9 - (0.05 * a);
18
        image_yscale = 0.9 - (0.05 * a);
19
        image_alpha = 0 - (0.1 * a);
20
    }
21
}
22
var temp_list = ds_list_create();
23
ds_list_copy(temp_list, segment_list);
24
ds_list_shuffle(temp_list);
25
var blobs = 12;
26
if (obj_darkshape_manager.phase_difficulty == 2)
27
    blobs = 6;
28
if (obj_darkshape_manager.phase_difficulty == 3)
29
    blobs = 4;
30
for (var aa = 0; aa < blobs; aa++)
31
{
32
    if (!ds_list_size(temp_list))
33
        break;
34
    ds_list_find_value(temp_list, aa % ds_list_size(temp_list)).blob_size++;
35
}
36
ds_list_destroy(temp_list);