Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_light_master_old_Create_0

(view raw script w/o annotations or w/e)
1
light_amount = 0
2
active = false
3
reverse = false
4
var j = 0
5
for (var i = 0; i < instance_number(all); i += 1)
6
{
7
    var inst = instance_find(all, i)
8
    var object_found = false
9
    switch inst.object_index
10
    {
11
        case obj_pl:
12
        case global.party_member:
13
            shadow_actor[j] = inst
14
            shadow_active[j] = false
15
            light_amount[j] = 0
16
            object_found = true
17
            break
18
    }
19
20
    switch object_get_parent(inst.object_index)
21
    {
22
        case 1130:
23
        case 1133:
24
            shadow_actor[j] = inst
25
            shadow_active[j] = false
26
            light_amount[j] = 0
27
            object_found = true
28
            break
29
    }
30
31
    if (object_found == true)
32
    {
33
        with (shadow_actor[j])
34
        {
35
            if place_meeting(x, y, obj_shadow_collider)
36
            {
37
                other.shadow_active[j] = true
38
                if (other.reverse == false)
39
                    other.light_amount[j] = 0.6
40
            }
41
        }
42
        j += 1
43
    }
44
}