Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_canopy_shadow_Create_0

(view raw script w/o annotations or w/e)
1
canopies = [];
2
depth = 49200;
3
surf = surface_create(512, 512);
4
shadowcolor = 0;
5
shadowalpha = 0.25;
6
timer = 0;
7
_X = 0;
8
_Y = 1;
9
_INDEX = 2;
10
_ROT = 3;
11
_MULT = 4;
12
_OFFSET = 5;
13
var x1 = -200;
14
var y1 = -200;
15
var x2 = (room_width / 2) + 400;
16
var y2 = (room_height / 2) + 400;
17
random_set_seed(room);
18
for (var xx = x1; xx < x2; xx++)
19
{
20
    xx += floor(random_range(140, 300));
21
    for (var yy = y1; yy < y2; yy++)
22
    {
23
        yy += floor(random_range(80, 150));
24
        array_push(canopies, [xx, yy, choose(0, 1, 2, 3), (xx * 1.15) + (yy * 0.1), 0.005 * (xx % 100) * 0.1, (xx * 0.21) + (yy * 0.111)]);
25
    }
26
}
27
random_set_seed(randomize());