Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_transform_particles_Step_2

(view raw script w/o annotations or w/e)
1
if live_call()
2
    return global.live_result;
3
with (obj_battle_ceroba_red_bullet)
4
{
5
    var inbetween_particles = 3
6
    var x_dif = x - xprevious
7
    var y_dif = y - yprevious
8
    var x_start = xprevious
9
    var y_start = yprevious
10
    var x_inc = x_dif / inbetween_particles
11
    var y_inc = y_dif / inbetween_particles
12
    for (var i = 0; i < inbetween_particles; i++)
13
    {
14
        var x_new = x_start + x_inc
15
        var y_new = y_start + y_inc
16
        var dir = point_direction(x_start, y_start, x_new, y_new)
17
        part_type_orientation(global.pt_trail_outer, dir, dir, 0, 0, 0)
18
        part_particles_create(global.ps_outer, x_new, y_new, global.pt_trail_outer, 1)
19
        part_type_orientation(global.pt_trail_inner, dir, dir, 0, 0, 0)
20
        part_particles_create(global.ps_inner, x_new, y_new, global.pt_trail_inner, 1)
21
        x_start = x_new
22
        y_start = y_new
23
    }
24
}