Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_bullet_green_food_Step_0

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ return global.debug == 1; }
() && keyboard_check_pressed(vk_tab))
2
    suck = true;
3
if (!suck && point_distance(x, y, obj_heart.x + 10, obj_heart.y + 10) <= 36)
4
{
5
    suck = true;
6
    friction = 0.5;
7
}
8
if (suck)
9
{
10
    suck *= (1.15 + (0.05 * (room == room_bullettest || (i_ex(obj_jackenstein_enemy) && obj_jackenstein_enemy.scaredycat))));
11
    x += lengthdir_x(sqrt(suck), 
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); }
());
12
    y += lengthdir_y(sqrt(suck), 
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); }
());
13
}
14
if (y > (obj_growtangle.y + 160))
15
    instance_destroy();