Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_gh_fireball_mobius_Step_1

(view raw script w/o annotations or w/e)
1
var old_x = x;
2
var old_y = y;
3
timer += ((pi / cycle_length) * rate);
4
timer2 += ((pi / cycle_length2) * rate);
5
x = round(basex + (sin(timer) * width));
6
y = round(basey + (cos(timer2) * height));
7
if (rate != 0)
8
{
9
    for (var i = 1; i <= trail_length; i++)
10
    {
11
        if (i_ex(orb[i]) && orb[i].suck == false)
12
        {
13
            var _timer = timer - ((((2 + (8 * i)) * pi) / cycle_length) * rate);
14
            var _timer2 = timer2 - ((((2 + (8 * i)) * pi) / cycle_length2) * rate);
15
            orb[i].x = basex + (sin(_timer) * width);
16
            orb[i].y = basey + (cos(_timer2) * height);
17
        }
18
    }
19
}
20
if (iris)
21
    iris_dir = round(
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)); }
() / 15) * 15;