1 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
2 |
return; |
3 |
var box = obj_dialogue_box_battle_transformation_any |
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 = obj_dialogue_box_battle_transformation_any |
15 |
var soul = obj_heart_battle_fighting_red |
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 |