Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_church_lantern_arc_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
    if (lanterntype == 0)
20
    {
21
        timer++;
22
        if (timer == 30 || timer == 33 || timer == 36 || timer == 39)
23
        {
24
            bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
25
            bullet.depth = depth - 5;
26
            bullet.targetx = x - 80 - rand;
27
            bullet.targety = y + 12;
28
            bullet.bouncy = 1;
29
            if (timer == 39)
30
            {
31
                timer = 0;
32
                rand = irandom(100);
33
            }
34
        }
35
    }
36
    if (lanterntype == 1)
37
    {
38
        timer++;
39
        if (timer >= 50)
40
        {
41
            bulletcounter++;
42
            repeat (3)
43
            {
44
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
45
                bullet.depth = depth - 5;
46
                bullet.targetx = 570 + random(60);
47
                bullet.targety = 530 + random(250);
48
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
49
                bullet.depth = depth - 5;
50
                bullet.targetx = 730 + random(60);
51
                bullet.targety = 530 + random(250);
52
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
53
                bullet.depth = depth - 5;
54
                bullet.targetx = 890 + random(60);
55
                bullet.targety = 530 + random(250);
56
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
57
                bullet.depth = depth - 5;
58
                bullet.targetx = 1050 + random(60);
59
                bullet.targety = 530 + random(250);
60
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
61
                bullet.depth = depth - 5;
62
                bullet.targetx = 1210 + random(60);
63
                bullet.targety = 530 + random(250);
64
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
65
                bullet.depth = depth - 5;
66
                bullet.targetx = 560 + random(700);
67
                bullet.targety = 530 + random(20);
68
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
69
                bullet.depth = depth - 5;
70
                bullet.targetx = 560 + random(700);
71
                bullet.targety = 650 + random(20);
72
                bullet = instance_create(x, y + 12, obj_overworld_lanternflame_arc);
73
                bullet.depth = depth - 5;
74
                bullet.targetx = 560 + random(700);
75
                bullet.targety = 770 + random(20);
76
            }
77
            timer = 0;
78
        }
79
    }
80
    if (i_ex(mylight))
81
    {
82
        mylight.smallerLight = lerp(mylight.smallerLight, 1120, 0.25);
83
        mylight.biggerLight = (mylight.smallerLight * 1.1) + 20;
84
    }
85
}