Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_pianopuzzle_Create_0

(view raw script w/o annotations or w/e)
1
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
2
{
3
    
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);
4
    if (keyboard_check(ord("P")))
5
        global.flag[850] = 7;
6
    if (keyboard_check(ord("1")))
7
        global.flag[892] = 0;
8
}
9
layer_set_visible("DEBUG_ASSETS", 0);
10
layer_set_visible("CUTSCENE_MARKERS", 0);
11
init = 0;
12
makecage = true;
13
blackoverlay = -4;
14
con = 0;
15
timer = 0;
16
rhint = 0;
17
if (global.flag[892] == 1)
18
{
19
    con = 99;
20
    makecage = false;
21
    with (obj_church_piano_playable)
22
        solved = 1;
23
    rhint = 999;
24
}
25
rhinttimer = 0;
26
hinttoget = 0;
27
if ((global.flag[886] && !global.flag[891]) || (!global.flag[886] && global.flag[891]))
28
    hinttoget = 1;
29
if (global.flag[886] && global.flag[891])
30
{
31
    hinttoget = -1;
32
    rhint = 999;
33
}
34
if (hinttoget == 0 && global.flag[893])
35
    rhint = 999;
36
if (hinttoget == 1 && global.flag[897])
37
    rhint = 999;
38
var fightjack = global.tempflag[98];
39
if (global.flag[850] >= 5)
40
    fightjack = false;
41
if (fightjack)
42
    event_user(9);
43
with (obj_border_controller)
44
{
45
    custom_effect_fade_speed = 0.02;
46
    stop_custom_effect();
47
}
48
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; }
("smallpiano_room.ogg");