Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_starlo_rope_Step_2

(view raw script w/o annotations or w/e)
1
if (!instance_exists(obj_heart_battle_fighting_parent))
2
    exit;
3
var box = 3154;
4
with (obj_heart_battle_fighting_parent)
5
{
6
    var distance = point_distance(x, y, box.x, box.y);
7
    var soul_speed = 3;
8
    if (move_x != 0 && move_y != 0)
9
        soul_speed = 4.24;
10
    var lerp_amount = soul_speed / 42;
11
    x = lerp(x, box.x, lerp_amount);
12
    y = lerp(y, box.y, lerp_amount);
13
}
14
box = 3154;
15
var soul = 2980;
16
stretch_multiplier = point_distance(box.x, box.y, soul.x, soul.y) / sprite_get_width(sprite_index);
17
image_xscale = stretch_multiplier;
18
direction = point_direction(box.x, box.y, soul.x, soul.y);
19
image_angle = direction;