Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_church_lantern_Step_0

(view raw script w/o annotations or w/e)
1
if (init == 0)
2
{
3
    with (obj_overworld_bulletarea)
4
        y = room_height * 2;
5
    init = 1;
6
}
7
siner++;
8
fakey = -18 - (sin(siner / 6) * 2);
9
if (con == 0)
10
    timer = 0;
11
if (con == 1)
12
{
13
    if (init == 1)
14
    {
15
        with (obj_overworld_bulletarea)
16
            y = ystart;
17
        init = 2;
18
    }
19
    timer++;
20
    if (timer >= 30)
21
    {
22
        bulletcounter++;
23
        bullet = instance_create(x, y + 12, obj_overworld_lanternflame);
24
        bullet.depth = depth - 5;
25
        bullet.direction = 180;
26
        bullet.savespeed = 8;
27
        bullet.friction = -0.02;
28
        burstcount++;
29
        if (burstcount < burstmax)
30
        {
31
            timer = 25;
32
        }
33
        else
34
        {
35
            timer = 0;
36
            burstcount = 0;
37
        }
38
    }
39
    if (i_ex(mylight))
40
    {
41
        mylight.smallerLight = lerp(mylight.smallerLight, (80 + ((40 * timer) / 15)) * 2, 0.25);
42
        mylight.biggerLight = (mylight.smallerLight * 1.1) + (timer / 2);
43
    }
44
}