Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_returnheart_Create_0

(view raw script w/o annotations or w/e)
1
burst = 0;
2
shift = 1;
3
image_alpha = 1;
4
flytime = 8;
5
if ((global.chapter == 4 && i_ex(obj_hammer_of_justice_enemy)) || (global.chapter == 4 && i_ex(obj_sound_of_justice_enemy) && !i_ex(obj_herokris)))
6
{
7
    distx = obj_herosusie.x - 150;
8
    disty = obj_herosusie.y + 40;
9
}
10
else
11
{
12
    distx = obj_herokris.x + 10;
13
    disty = obj_herokris.y + 40;
14
}
15
dist = point_distance(x, y, distx, disty);
16
move_towards_point(distx, disty, dist / flytime);
17
alarm[0]
 = flytime;
gml_Object_obj_returnheart_Alarm_0.gml

x = distx; y = disty; instance_create(x, y, obj_heartburst); instance_destroy();
18
image_speed = 0;