Deltarune (Chapter 4) 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
var ball_x_offset = 0;
4
var ball_y_offset = 0;
5
var ball_sprite = 1098;
6
if (scr_recruited_all_in_chapter(2))
7
{
8
    ball_sprite = 1221;
9
    ball_x_offset = -16;
10
    ball_y_offset = -12;
11
}
12
if (scr_recruited_all_in_chapter(3))
13
{
14
    ball_sprite = 3716;
15
    ball_x_offset = -16;
16
    ball_y_offset = -20;
17
}
18
var ball_npc = instance_create(59 + ball_x_offset, 271 + ball_y_offset, obj_npc_room);
19
with (ball_npc)
20
{
21
    sprite_index = ball_sprite;
22
    extflag = "ballperson";
23
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
24
}
25
var ball_legs_marker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(54, 300, spr_blockguy_legs_only);
26
ball_legs_marker.depth = ball_npc.depth + 10;
27
var ball_block = instance_create(ball_legs_marker.x, ball_legs_marker.y, obj_solidblocksized);
28
var bloxer_head_npc = instance_create(220, 300, obj_npc_room);
29
with (bloxer_head_npc)
30
{
31
    sprite_index = spr_blockguy_head_only;
32
    extflag = "bloxer_head";
33
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
34
}
35
var bloxer_legs_npc = instance_create(140, 205, obj_npc_room);
36
with (bloxer_legs_npc)
37
{
38
    sprite_index = spr_blockguy_pants_only;
39
    extflag = "bloxer_legs";
40
    
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
41
}
42
var lost_animals = 0;
43
if (global.flag[642 recruit_task_manager] != 1)
44
{
45
    if (global.flag[632 recruit_tasque] == 1)
46
    {
47
        var tasque = instance_create(280, 370, obj_readable_room1);
48
        tasque.sprite_index = spr_tasque_idle_overworld;
49
        tasque.visible = 1;
50
        tasque.image_xscale = 2;
51
        tasque.image_yscale = 2;
52
        with (tasque)
53
            path_start(path_great_door, 2, path_action_continue, 0);
54
        lost_animals++;
55
    }
56
    if (global.flag[634 recruit_maus] == 1)
57
    {
58
        var maus = instance_create(290, 320, obj_readable_room1);
59
        maus.sprite_index = spr_maus_idle;
60
        maus.visible = 1;
61
        maus.image_xscale = 2;
62
        maus.image_yscale = 2;
63
        with (maus)
64
        {
65
            path_start(path_great_door, 2, path_action_continue, 0);
66
            path_position = 0.2;
67
        }
68
        lost_animals++;
69
    }
70
    if (global.flag[631 recruit_poppup] == 1)
71
    {
72
        var poppup = instance_create(300, 260, obj_readable_room1);
73
        poppup.sprite_index = spr_npc_poppup;
74
        poppup.visible = 1;
75
        poppup.image_xscale = 2;
76
        poppup.image_yscale = 2;
77
        with (poppup)
78
        {
79
            path_start(path_great_door, 2, path_action_continue, 0);
80
            path_position = 0.4;
81
        }
82
        lost_animals++;
83
    }
84
    if (lost_animals == 0 && global.flag[462 cars_hit] < 3 && global.flag[465 car_part_completed] == 1)
85
    {
86
        var car = instance_create(280, 330, obj_readable_room1);
87
        car.sprite_index = spr_traffic_car_side_legs_small_left;
88
        car.visible = 1;
89
        car.image_xscale = 2;
90
        car.image_yscale = 2;
91
        with (car)
92
            path_start(path_great_door, 2, path_action_continue, 0);
93
    }
94
}