Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_ch2_room_mansion_east_2f_c_a_Step_0

(view raw script w/o annotations or w/e)
1
if (dothis == true)
2
{
3
    saucerCount = 0;
4
    with (obj_saucer)
5
    {
6
        if (mode == 2 && con == 0)
7
            other.saucerCount++;
8
    }
9
    if (saucerCount == 1)
10
    {
11
        with (obj_saucer)
12
        {
13
            if (mode == 2 && con == 0)
14
            {
15
                treasure = instance_create(x, y, obj_saucer);
16
                treasure.mode = 0;
17
                treasure.makecontent = 1;
18
                treasure.contentsprite = spr_treasurebox;
19
                instance_destroy();
20
            }
21
        }
22
    }
23
    if (instance_exists(obj_marker))
24
    {
25
        with (obj_marker)
26
        {
27
            if (sprite_index == spr_treasurebox)
28
            {
29
                box = instance_create(x + 30, y + 12, obj_treasure_room);
30
                with (box)
31
                    depth = other.depth - 10;
32
                if (other.complete == 0)
33
                    other.complete = 1;
34
                instance_destroy();
35
            }
36
        }
37
    }
38
}
39
if (complete == 1)
40
{
41
    if (instance_exists(obj_saucer_ufo_bullet))
42
    {
43
        with (obj_saucer_ufo_bullet)
44
            active = 0;
45
    }
46
    if (instance_exists(obj_saucer_ufo))
47
    {
48
        with (obj_saucer_ufo)
49
        {
50
            con = 2;
51
            hspeed = 24;
52
        }
53
    }
54
}