Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_confetti_wind_Step_0

(view raw script w/o annotations or w/e)
1
var _list = ds_list_create();
2
var _num;
3
if (circle)
4
    _num = collision_circle_list(x, y, radius, obj_confetti_overworld, false, true, _list, false);
5
else
6
    _num = collision_rectangle_list(x - (size.x / 2), y - (size.y / 2), x + (size.x / 2), y + (size.y / 2), obj_confetti_overworld, false, true, _list, false);
7
if (_num > 0)
8
{
9
    for (i = 0; i < _num; i++)
10
    {
11
        with (ds_list_find_value(_list, i))
12
        {
13
            if (!airborne)
14
            {
15
                airborne = true;
16
                fallspeed = -other.upward_force;
17
                speed = other.force;
18
                if (radial)
19
                    direction = point_direction(other.x, other.y, x, y);
20
                else
21
                    direction = other.direction;
22
                event_user(0);
23
            }
24
        }
25
    }
26
}
27
if (lifetime > 0)
28
{
29
    lifetime--;
30
    if (lifetime <= 0)
31
        instance_destroy();
32
}