Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_bellclimb_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 0)
2
{
3
    var cont = 0;
4
    var bell = 0;
5
    with (obj_bell_small_playable)
6
    {
7
        if (extflag == "treasure")
8
        {
9
            if (rung == true && con == 0)
10
            {
11
                cont = 1;
12
                bell = id;
13
            }
14
        }
15
    }
16
    if (cont == 1)
17
    {
18
        con = 1;
19
        snd_play(snd_won);
20
        treasure = instance_create(bell.x - 20, bell.y + 8, obj_treasure_room);
21
        treasure.depth = bell.depth + 1;
22
        
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(treasure);
23
        treasure.gravity = 0.7;
24
        scr_limitval_upper(treasure, "y", 1732);
25
    }
26
}
27
if (con == 1)
28
{
29
    if (treasure.y >= 1732)
30
    {
31
        treasure.gravity = 0;
32
        treasure.vspeed = 0;
33
        snd_play(snd_impact);
34
        con = 2;
35
    }
36
}