Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_light_master_old_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
for (var i = 0; i < array_length(shadow_actor); i += 1)
4
{
5
    with (shadow_actor[i])
6
    {
7
        if (place_meeting(x, y, obj_shadow_collider))
8
            other.shadow_active[i] = true;
9
        else
10
            other.shadow_active[i] = false;
11
    }
12
    if (shadow_active[i] == true)
13
    {
14
        if (light_amount[i] < 0.4)
15
            light_amount[i] += 0.1;
16
        else
17
            light_amount[i] = 0.4;
18
    }
19
    else if (light_amount[i] > 0)
20
    {
21
        light_amount[i] -= 0.2;
22
    }
23
}
24
depth = -99999;