Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_bullet_foxprint_Step_0

(view raw script w/o annotations or w/e)
1
event_inherited();
2
if (alarm[0] > 0)
3
{
4
    direction += clamp(angle_difference(
scr_at_player
scr_at_player

function
scr_at_player(arg0 = x, arg1 = y)
{ return point_direction(arg0, arg1, obj_heart.x + 10, obj_heart.y + 10); }
(), direction) / power(alarm[0], 0.6), -sqrt(alarm[0]), sqrt(alarm[0]));
5
    image_angle = direction;
6
    with (obj_regularbullet)
7
    {
8
        if (sprite_index == spr_bullet_toebean)
9
        {
10
            if (owner == other.id)
11
            {
12
                direction = other.direction + (10 * image_yscale * image_index);
13
                x = other.x + lengthdir_x(12 - (6 * image_index), other.direction) + lengthdir_x(12 * image_index, other.direction + (90 * sign(image_yscale)));
14
                y = other.y + lengthdir_y(12 - (6 * image_index), other.direction) + lengthdir_y(12 * image_index, other.direction + (90 * sign(image_yscale)));
15
            }
16
        }
17
    }
18
}