Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_church_triggerlight_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    init = 1;
4
    if (permaflag != -1 && global.flag[permaflag])
5
    {
6
        with (instance_create(lightxpos, lightypos, obj_light_following))
7
        {
8
            size = other.lightsize;
9
            instance_destroy();
10
        }
11
    }
12
}
13
if (place_meeting(x, y, obj_mainchara) || trigger == 1)
14
    trigger = 2;
15
if (trigger == 2)
16
{
17
    with (instance_create(lightxpos, lightypos, obj_light_following))
18
    {
19
        target = 0;
20
        size = 1;
21
        
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("size", 1, other.lightsize, other.fadeintime, -1, "out");
22
        depth = -4;
23
        snd_play(snd_noise, 0.4, 0.6);
24
        snd_play(snd_spearappear, 0.7, 1.4);
25
    }
26
    instance_destroy();
27
    trigger = 3;
28
    instance_destroy();
29
}