Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_darkness_trail_wild_Step_0

(view raw script w/o annotations or w/e)
1
if (!init)
2
{
3
    trail_surf = surface_create(room_width, room_height);
4
    init = true;
5
}
6
var _length = array_length(points);
7
var _point = instance_create(xlast, ylast, obj_make_fountain_ball);
8
_point.owner = id;
9
_point.life = 1 - (1 / lifetime);
10
array_insert(points, 0, _point);
11
_point.hspeed = sin(siner / 3);
12
_point.vspeed = cos(siner / 2);
13
_point.gravity = 0.2;
14
_point.image_xscale = sizer;
15
_point.image_yscale = sizer;
16
_point.depth = -10;
17
sizer -= 0.025;
18
if (sizer < 0.05)
19
    sizer = 1;
20
if (demo)
21
{
22
    var _angle_a = sin(siner / 20) * 45;
23
    
scr_debug_print_persistent
scr_debug_print_persistent

function
scr_debug_print_persistent(arg0, arg1)
{ } function debug_print_persistent(arg0, arg1) { } function scr_debug_delete_persistent(arg0, arg1 = false) { } function scr_debug_clear_persistent() { }
("angle", string(_angle_a));
24
    hingepos.x = camerax() + 320 + lengthdir_x(240, 270 + (sin(siner / 20) * 45));
25
    hingepos.y = cameray() + lengthdir_y(240, 270 + (sin(siner / 20) * 45));
26
    x = hingepos.x + lengthdir_x(80, (siner * 10) % 360);
27
    y = hingepos.y + lengthdir_y(80, (siner * 10) % 360);
28
    siner++;
29
}
30
ylast = y;
31
xlast = x;