Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkness_trail_Create_0

(view raw script w/o annotations or w/e)
1
points = [];
2
start_color = c_red;
3
end_color = c_black;
4
width = 8;
5
end_size = 0;
6
gradient = false;
7
rounded = false;
8
lifetime = 40;
9
xlast = ystart;
10
ylast = xstart;
11
demo = true;
12
siner = 0;
13
hingepos = new Vector2(0, 0);
14
depth = 9999;
15
init = false;
16
active = true;
17
size = 0.7;
18
sizer = size;
19
lifetime = 20;
20
burst = true;
21
active = false;
22
target = -4;
23
xoff = 0;
24
yoof = 0;
25
subtrail = false;
26
speed_scale = false;
27
base_speed = speed;
28
foreground = -4;
29
last_orb = -4;
30
31
make_burst_ball = function(arg0, arg1, arg2, arg3, arg4)
32
{
33
    var _point = instance_create(arg0, arg1, obj_make_fountain_ball_titan);
34
    _point.owner = id;
35
    _point.life = 1 - (1 / lifetime);
36
    array_insert(points, 0, _point);
37
    _point.speed = arg3;
38
    _point.direction = arg2;
39
    _point.gravity = 0.2;
40
    _point.image_xscale = arg4;
41
    _point.image_yscale = arg4;
42
    _point.depth = target.depth - 1;
43
    _point.hspeed += sin(siner / 3) * 2;
44
    _point.vspeed += cos(siner / 2) * 2;
45
    _point.friction = 0.05 * arg3;
46
    return _point;
47
};
48
49
make_trail_ball = function(arg0, arg1)
50
{
51
    var _point = instance_create(arg0, arg1, obj_make_fountain_ball_titan);
52
    _point.owner = id;
53
    _point.life = 1 - (1 / lifetime);
54
    array_insert(points, 0, _point);
55
    _point.hspeed += sin(siner) * 0.2;
56
    _point.vspeed += cos(siner) * 0.2;
57
    _point.gravity = 0.2;
58
    _point.image_xscale = sizer;
59
    _point.image_yscale = sizer;
60
    _point.type = 1;
61
    _point.depth = (target != -4) ? target.depth : depth;
62
    siner += 0.25;
63
    return _point;
64
};