Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gh_fireball_square_Step_1

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    init = true;
4
    mask_index = -1;
5
    path_add_point(path, basex, basey - (width * vflip), 100);
6
    path_add_point(path, basex + (width * hflip), basey - (width * vflip), 100);
7
    path_add_point(path, basex + (width * hflip), basey, 100);
8
    path_add_point(path, basex + (width * hflip), basey + (width * vflip), 100);
9
    path_add_point(path, basex, basey + (width * vflip), 100);
10
    path_add_point(path, basex - (width * hflip), basey + (width * vflip), 100);
11
    path_add_point(path, basex - (width * hflip), basey, 100);
12
    path_add_point(path, basex - (width * hflip), basey - (width * vflip), 100);
13
    path_add_point(path, basex, basey - (width * vflip), 100);
14
    path_start(path, (width * 4) / cycle_length, path_action_restart, true);
15
}
16
if (iris && (path_speed != 0 || width == 0))
17
{
18
    if (trueprevx == x && trueprevy == y)
19
        iris_dir = 
scr_at_player
scr_at_player

function
scr_at_player(arg0 = x, arg1 = y)
{ return point_direction(arg0, arg1, obj_heart.x + (obj_heart.sprite_width / 2), obj_heart.y + (obj_heart.sprite_height / 2)); }
();
20
    else
21
        iris_dir = (iris_dir + (angle_difference(point_direction(trueprevx, trueprevy, x, y), iris_dir) / 5)) % 360;
22
}
23
trueprevx = x;
24
trueprevy = y;