Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_castle_church_entrance_Create_0

related scripts: Create_0 Draw_0Other_11Other_15Step_0Step_1Step_2

(view raw script w/o annotations or w/e)
1
con = 0;
2
timer = 0;
3
init = 0;
4
siner = 0;
5
roomphase = 0;
6
turnofflayers("CUT");
7
turnofflayers("DEBUG");
8
turnofflayers("NPCs");
9
turnofflayers("PianoMarkers");
10
turnofflayers("ASSETS");
11
tasquemanager = -4;
12
tasque = -4;
13
maus = -4;
14
if (global.flag[642 recruit_task_manager] == 1 && global.flag[632 recruit_tasque] == 1 && global.flag[634 recruit_maus] == 1)
15
{
16
    tasquemanager = scr_makenpc_fromasset(findsprite(spr_dw_castle_church_npc_tasquemanager));
17
    tasque = scr_makenpc_fromasset(findsprite(spr_dw_castle_church_npc_tasque));
18
    maus = scr_makenpc_fromasset(findsprite(spr_dw_castle_church_npc_maus));
19
    maus.marker.depth += 1000;
20
}
21
wafer = scr_makenpc_fromasset(findsprite(spr_npc_church_wafer, "NPCs", #70FF7C));
22
wafer.marker.image_blend = c_white;
23
sweet = scr_makenpc_fromasset(findsprite(spr_dw_npc_sweet_box_right, "NPCs"), true);
24
kk = scr_makenpc_fromasset(findsprite(spr_dw_npc_k_k_box_left, "NPCs"), true);
25
with (sweet.marker)
26
{
27
    con = 0;
28
    timer = 0;
29
    
30
    dance = function()
31
    {
32
        timer = 0;
33
        con = 1;
34
    };
35
    
36
    step_func = function()
37
    {
38
        if (con == 1)
39
        {
40
            timer++;
41
            image_index += (((1 - (timer / 15)) * 1) / 2);
42
            if (timer >= 15)
43
            {
44
                con = 0;
45
                timer = 0;
46
                image_index = 0;
47
            }
48
        }
49
    };
50
}
51
with (kk.marker)
52
{
53
    con = 0;
54
    timer = 0;
55
    
56
    dance = function()
57
    {
58
        timer = 0;
59
        con = 1;
60
    };
61
    
62
    step_func = function()
63
    {
64
        if (con == 1)
65
        {
66
            timer++;
67
            image_index += (((1 - (timer / 15)) * 1) / 2);
68
            if (timer >= 15)
69
            {
70
                con = 0;
71
                timer = 0;
72
                image_index = 0;
73
            }
74
        }
75
    };
76
}
77
if (scr_enemyrecruitcheck("organikk"))
78
    instance_create(0, 0, obj_dw_castle_church_entrance_organikks);
79
unlockedclimb = false;
80
if (scr_enemyrecruitcheck("balthizard") && scr_enemyrecruitcheck("mizzle") && scr_enemyrecruitcheck("shadowguy"))
81
    unlockedclimb = true;
82
noclimb = -4;
83
if (unlockedclimb == false)
84
{
85
    noclimb = scr_makenpc_fromasset(findsprite(spr_dw_castle_church_entrance_climbdoor));
86
    noclimb.marker.image_index = 1;
87
}
88
else
89
{
90
    doorway = scr_marker_fromasset(findsprite(spr_dw_castle_church_entrance_climbdoor));
91
    
scr_depth_alt
scr_depth_alt

function
scr_depth_alt(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10) + (arg1 * 10)); }
(doorway, -5000);
92
    doorway.image_index = 0;
93
    doorway.image_speed = 0;
94
}
95
instance_create_depth(0, 0, 0, obj_musicer_darkcastle);
96
if (scr_recruited_all_in_chapter(4))
97
{
98
    var cup_npc = instance_create(1420, 332, obj_npc_room);
99
    with (cup_npc)
100
    {
101
        extflag = "church_cup";
102
        sprite_index = spr_npc_cup_walk;
103
        
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
104
    }
105
}