Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_forestmaze_controller_Other_10

(view raw script w/o annotations or w/e)
1
if (room == room_forest_maze1)
2
{
3
    if (obj_mainchara.x <= (room_width / 2))
4
        sidechoice = 0;
5
    if (obj_mainchara.x >= (room_width / 2))
6
        sidechoice = 1;
7
}
8
if (room == room_forest_maze2)
9
{
10
    if (obj_mainchara.x >= 100)
11
        sidechoice = 2;
12
    if (obj_mainchara.x >= 260)
13
        sidechoice = 3;
14
    if (obj_mainchara.x >= 420)
15
        sidechoice = 4;
16
}
17
roomchoice = room_forest_maze1;
18
if (room == room_forest_maze2)
19
    roomchoice = room_forest_maze2;
20
if (sidechoice == proper_choice)
21
{
22
    global.flag[291 maze_progress] += 1;
23
    global.flag[292 maze_fail_count] = 0;
24
    if (global.flag[291 maze_progress] == 4)
25
    {
26
        if (global.plot < 100)
27
        {
28
            roomchoice = room_forest_maze_susie;
29
        }
30
        else
31
        {
32
            global.flag[291 maze_progress] = 5;
33
            roomchoice = room_forest_maze2;
34
        }
35
    }
36
    if (global.flag[291 maze_progress] == 9)
37
    {
38
        roomchoice = room_forest_savepoint3;
39
        if (global.plot < 120)
40
            global.plot = 120;
41
    }
42
}
43
else
44
{
45
    rem291 = global.flag[291 maze_progress];
46
    global.flag[291 maze_progress] = 0;
47
    global.flag[292 maze_fail_count] += 1;
48
    if (global.flag[293 lancer_deadend] >= 1)
49
        global.flag[292 maze_fail_count] = 3;
50
    if (room == room_forest_maze2)
51
        global.flag[292 maze_fail_count] = 3;
52
    if (global.flag[292 maze_fail_count] >= 2)
53
    {
54
        global.flag[292 maze_fail_count] = 0;
55
        roomchoice = room_forest_maze_deadend;
56
        if (rem291 >= 5)
57
        {
58
            global.flag[291 maze_progress] = 5;
59
            roomchoice = room_forest_maze_deadend2;
60
        }
61
    }
62
}
63
room_goto(roomchoice);