Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_ob_gen_Step_0

(view raw script w/o annotations or w/e)
1
if (room == 9999999999)
2
{
3
    if (timer >= 900)
4
    {
5
        instance_create(1202, 240, obj_ob_checkertile);
6
        instance_create(1242, 280, obj_ob_checkertile);
7
        instance_create(1282, 320, obj_ob_checkertile);
8
        instance_create(962, 240, obj_ob_checkertile);
9
        instance_create(1002, 280, obj_ob_checkertile);
10
        instance_create(1042, 320, obj_ob_checkertile);
11
        instance_create(722, 240, obj_ob_checkertile);
12
        instance_create(762, 280, obj_ob_checkertile);
13
        instance_create(802, 320, obj_ob_checkertile);
14
    }
15
    if (obj_mainchara.x >= 4000 && obj_mainchara.x <= 1620)
16
        obj_mainchara.battlemode = 1;
17
    else
18
        obj_mainchara.battlemode = 0;
19
    if (global.interact == 0)
20
        timer += 1;
21
    if (timer >= 40)
22
    {
23
        timer = 0;
24
        ch = con * 40;
25
        instance_create(1442 - ch, 240 + ch, obj_ob_checkertile);
26
        con += 1;
27
        if (con > 2)
28
            con = 0;
29
    }
30
}
31
if (whitetimer >= 20 && whitecon == 1)
32
{
33
    xdiff = obj_mainchara.x - 340;
34
    obj_mainchara.x = 340;
35
    if (i_ex(global.cinstance[0]))
36
    {
37
        global.cinstance[0].x -= xdiff;
38
        for (i = 25; i >= 0; i -= 1)
39
            global.cinstance[0].remx[i] -= xdiff;
40
    }
41
    if (i_ex(global.cinstance[1]))
42
    {
43
        global.cinstance[1].x -= xdiff;
44
        for (i = 25; i >= 0; i -= 1)
45
            global.cinstance[1].remx[i] -= xdiff;
46
    }
47
    whitecon = 2;
48
}
49
if (room == 9999999999999)
50
{
51
    if (obj_mainchara.x >= 4000 && obj_mainchara.x <= 1620)
52
        obj_mainchara.battlemode = 1;
53
    else
54
        obj_mainchara.battlemode = 0;
55
}