Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_intropiano_Create_0

(view raw script w/o annotations or w/e)
1
init = 0;
2
con = 0;
3
timer = 0;
4
makedark = true;
5
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
6
{
7
    if (keyboard_check(ord("P")))
8
    {
9
        global.plot = 108;
10
        global.flag[869] = 0;
11
    }
12
    if (global.plot < 108)
13
    {
14
        global.plot = 108;
15
        
scr_setparty
scr_setparty

function
scr_setparty(arg0 = false, arg1 = false, arg2 = false)
{ var kris = obj_mainchara; var slot = 0; var __make = true; if (!i_ex(kris)) __make = false;
scr_losechar();
safe_delete(obj_caterpillarchara); if (arg0 == true) {
scr_getchar(2);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 2, slot))
{ halign = (global.darkzone == 0) ? 3 : 6; valign = (global.darkzone == 0) ? 6 : 16; x -= halign; y -= valign; } } slot++; } if (arg1 == true) {
scr_getchar(3);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 3, slot))
{ halign = 2; valign = 12; x -= halign; y -= valign; } } slot++; } if (arg2 == true) {
scr_getchar(4);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 4, slot))
{ halign = (global.darkzone == 0) ? 2 : 4; valign = (global.darkzone == 0) ? 9 : 18; x -= halign; y -= valign; } } slot++; } }
(1, 0, 0);
16
    }
17
    if (global.plot >= 120)
18
        
scr_setparty
scr_setparty

function
scr_setparty(arg0 = false, arg1 = false, arg2 = false)
{ var kris = obj_mainchara; var slot = 0; var __make = true; if (!i_ex(kris)) __make = false;
scr_losechar();
safe_delete(obj_caterpillarchara); if (arg0 == true) {
scr_getchar(2);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 2, slot))
{ halign = (global.darkzone == 0) ? 3 : 6; valign = (global.darkzone == 0) ? 6 : 16; x -= halign; y -= valign; } } slot++; } if (arg1 == true) {
scr_getchar(3);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 3, slot))
{ halign = 2; valign = 12; x -= halign; y -= valign; } } slot++; } if (arg2 == true) {
scr_getchar(4);
if (__make) { with (
scr_makecaterpillar(kris.x, kris.y, 4, slot))
{ halign = (global.darkzone == 0) ? 2 : 4; valign = (global.darkzone == 0) ? 9 : 18; x -= halign; y -= valign; } } slot++; } }
(1, 1, 0);
19
}
20
steelcage = instance_create(1200, 120, obj_dw_church_steelstaff);
21
if (global.flag[869] == 1)
22
{
23
    makedark = false;
24
    steelcage.flyaway = false;
25
    safe_delete(steelcage);
26
    with (obj_church_piano_playable)
27
        solved = 1;
28
    con = 1;
29
    with (obj_church_piano_hint)
30
        instance_destroy();
31
    with (obj_floorswitch)
32
        instance_destroy();
33
    with (obj_church_triggerlight)
34
        instance_destroy();
35
}
36
scr_musicer
scr_musicer

function
scr_musicer(arg0 = "dogcheck.ogg", arg1 = 0.7, arg2 = 1, arg3 = 0, arg4 = -1)
{ var musicer = instance_create_depth(0, 0, 0, obj_musicer_gen); musicer.song = arg0; musicer.volume = arg1; musicer.pitch = arg2; musicer.delay = arg3; musicer.fadein = arg4; return musicer; }
("darkchurch_intro.ogg", 0.7);
37
init = 0;