Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_moveheart_Create_0

(view raw script w/o annotations or w/e)
1
burst = 0;
2
shift = 1;
3
flytime = 8;
4
image_alpha = 0;
5
if (i_ex(obj_jackenstein_enemy))
6
    image_alpha = 1;
7
darkalpha = 0;
8
if (instance_exists(obj_heartmarker))
9
{
10
    distx = obj_heartmarker.x;
11
    disty = obj_heartmarker.y;
12
}
13
else if (!instance_exists(obj_growtangle))
14
{
15
    distx = __view_get(e__VW.XView, 0) + 310;
16
    disty = __view_get(e__VW.YView, 0) + 160;
17
}
18
else
19
{
20
    distx = obj_growtangle.x - 10;
21
    disty = obj_growtangle.y - 10;
22
}
23
dist = point_distance(x, y, distx, disty);
24
move_towards_point(distx, disty, dist / flytime);
25
alarm[0]
 = flytime;
gml_Object_obj_moveheart_Alarm_0.gml

x = distx; y = disty; if (!i_ex(obj_heart)) { heart = instance_create(x, y, obj_heart); if (i_ex(obj_jackenstein_enemy)) sprite_index = spr_dodgeheart_small; } instance_destroy();
26
image_speed = 0;
27
instance_create(x, y, obj_heartburst);
28
29
enum e__VW
30
{
31
    XView,
32
    YView,
33
    WView,
34
    HView,
35
    Angle,
36
    HBorder,
37
    VBorder,
38
    HSpeed,
39
    VSpeed,
40
    Object,
41
    Visible,
42
    XPort,
43
    YPort,
44
    WPort,
45
    HPort,
46
    Camera,
47
    SurfaceID
48
}