Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2_crabroom_Step_0

(view raw script w/o annotations or w/e)
1
scr_board_populatevars
scr_board_populatevars

function
scr_board_populatevars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (kris == 0) { with (obj_mainchara_board) { if (name == "kris") other.kris = id; } } if (ralsei == 0) { with (obj_mainchara_board) { if (name == "ralsei") other.ralsei = id; } } if (susie == 0) { with (obj_mainchara_board) { if (name == "susie") other.susie = id; } } }
();
2
scr_gameshow_populatevars
scr_gameshow_populatevars

function
scr_gameshow_populatevars()
{ if (!variable_instance_exists(id, "kr_real")) kr_real = 0; if (!variable_instance_exists(id, "su_real")) su_real = 0; if (!variable_instance_exists(id, "ra_real")) ra_real = 0; if (!variable_instance_exists(id, "tenna")) tenna = 0; if (kr_real == 0) { with (obj_mainchara) other.kr_real = id; } if (su_real == 0) { with (obj_caterpillarchara) { if (name == "susie") other.su_real = id; } } if (ra_real == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ra_real = id; } } if (tenna == 0) { with (obj_actor_tenna) other.tenna = id; } }
();
3
if (active == 1)
4
{
5
    if (con == 0 && obj_board_camera.con == 0)
6
    {
7
        if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
8
            kris.camera = true;
9
    }
10
    if (global.interact == 0 && obj_board_camera.con == 0 && obj_board_camera.shift == "none")
11
    {
12
        if (makecrabs == true)
13
        {
14
            var cont = true;
15
            with (obj_board_b2crab_spawner)
16
            {
17
                if (done == 1)
18
                    cont = false;
19
            }
20
            if (cont)
21
            {
22
                var xloc = board_tilex(2.5);
23
                var yloc = board_tiley(2.5);
24
                var xspace = 192;
25
                var yspace = 96;
26
                crtimer++;
27
                if ((crtimer % 120) == 0)
28
                {
29
                    var special = choose(0, 1, 2, 3);
30
                    crab[0] = instance_create(xloc, yloc, obj_board_b2crab_spawner);
31
                    crab[1] = instance_create(xloc + xspace, yloc, obj_board_b2crab_spawner);
32
                    crab[2] = instance_create(xloc, yloc + yspace, obj_board_b2crab_spawner);
33
                    crab[3] = instance_create(xloc + xspace, yloc + yspace, obj_board_b2crab_spawner);
34
                    with (obj_board_b2crab_spawner)
35
                        timer = irandom_range(-10, 0);
36
                    if (global.flag[1227 got_antlion_photo] == 0)
37
                        crab[special].special = 1;
38
                    crindex++;
39
                }
40
            }
41
        }
42
    }
43
}
44
else
45
{
46
}