Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_npc_castle_door_Create_0

(view raw script w/o annotations or w/e)
1
con = -1;
2
howl_con = 0;
3
if (global.chapter == 2)
4
{
5
    if (global.flag[302 toy_deliver_progress] >= 1)
6
    {
7
        var yPos = (global.flag[642 recruit_task_manager] == 1) ? 185 : 205;
8
        var bloxer = instance_create(115, yPos, obj_npc_room);
9
        bloxer.sprite_index = (global.flag[642 recruit_task_manager] == 1) ? spr_blockguy_pants4 : spr_blockguy_pants3;
10
    }
11
    if (global.plot >= 200)
12
    {
13
        var lost_animals = 0;
14
        if (global.flag[642 recruit_task_manager] != 1)
15
        {
16
            if (global.flag[632 recruit_tasque] == 1)
17
            {
18
                var tasque = instance_create(280, 370, obj_readable_room1);
19
                tasque.sprite_index = spr_tasque_idle_overworld;
20
                tasque.visible = 1;
21
                tasque.image_xscale = 2;
22
                tasque.image_yscale = 2;
23
                with (tasque)
24
                    path_start(path_great_door, 2, path_action_continue, 0);
25
                lost_animals++;
26
            }
27
            if (global.flag[634 recruit_maus] == 1)
28
            {
29
                var maus = instance_create(290, 320, obj_readable_room1);
30
                maus.sprite_index = spr_maus_idle;
31
                maus.visible = 1;
32
                maus.image_xscale = 2;
33
                maus.image_yscale = 2;
34
                with (maus)
35
                {
36
                    path_start(path_great_door, 2, path_action_continue, 0);
37
                    path_position = 0.2;
38
                }
39
                lost_animals++;
40
            }
41
            if (global.flag[631 recruit_poppup] == 1)
42
            {
43
                var poppup = instance_create(300, 260, obj_readable_room1);
44
                poppup.sprite_index = spr_npc_poppup;
45
                poppup.visible = 1;
46
                poppup.image_xscale = 2;
47
                poppup.image_yscale = 2;
48
                with (poppup)
49
                {
50
                    path_start(path_great_door, 2, path_action_continue, 0);
51
                    path_position = 0.4;
52
                }
53
                lost_animals++;
54
            }
55
        }
56
        if (lost_animals == 0 && global.flag[462 cars_hit] < 3 && global.flag[465 car_part_completed] == 1)
57
        {
58
            var car = instance_create(280, 330, obj_readable_room1);
59
            car.sprite_index = spr_traffic_car_side_legs_small_left;
60
            car.visible = 1;
61
            car.image_xscale = 2;
62
            car.image_yscale = 2;
63
            with (car)
64
                path_start(path_great_door, 2, path_action_continue, 0);
65
        }
66
    }
67
}
68
else
69
{
70
    instance_destroy();
71
}