Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_susiezilla_repair_spark_Create_0

(view raw script w/o annotations or w/e)
1
image_speed = 0;
2
xanchor = x;
3
yanchor = y;
4
xdist = 0;
5
ydist = 0;
6
xspeed = 0;
7
yspeed = 0;
8
the_max = choose(pi, 2 * pi);
9
time_req = 16 + irandom(12);
10
interval = the_max / time_req;
11
amplitude = 16 + irandom(16);
12
counter = 0;
13
abs_counter = 0;
14
amp_choice = choose(-1, 1);
15
if (i_ex(obj_susiezilla_statue))
16
{
17
    xdist = (obj_susiezilla_statue.x + irandom_range(-32, 32)) - x;
18
    ydist = obj_susiezilla_statue.y - 64 - irandom(64) - y;
19
    xspeed = xdist / time_req;
20
    yspeed = ydist / time_req;
21
}
22
else
23
{
24
    instance_destroy();
25
}