Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_lightsource_floor_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    if (!i_ex(obj_window_shadow_maker))
5
        instance_create(0, 0, obj_window_shadow_maker);
6
    var _stretch = instance_exists(obj_window_shadow_maker) ? obj_window_shadow_maker.stretch : 0;
7
    if (_stretch > 1)
8
    {
9
        y += (sprite_height * (_stretch - 1));
10
        image_yscale *= _stretch;
11
    }
12
    var _lightCaster = instance_create(x, 0, obj_darkness_floorArea_light);
13
    _lightCaster.sprite_index = sprite_index;
14
    _lightCaster.image_index = 2;
15
    _lightCaster.image_xscale = image_xscale;
16
    _lightCaster.image_yscale = room_height;
17
    _lightCaster.depth = depth;
18
}