Deltarune (Chapter 4) script viewer

← back to main script listing

gml_Object_obj_dw_church_intro_guei_Create_0

(view raw script w/o annotations or w/e)
1
depth = -5;
2
global.flag[7 disable_menu?] = 0;
3
if (global.plot < 125)
4
    global.plot = 125;
5
layer_set_visible("debug_assets", 0);
6
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
7
{
8
    if (keyboard_check(ord("1")))
9
        global.plot = 125;
10
    if (global.tempflag[90] == 1 || keyboard_check(ord("2")))
11
    {
12
        global.plot = 126;
13
        global.facing = 1;
14
        global.tempflag[90] = 0;
15
        setxy(2936, 860, 1049);
16
        
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);
17
    }
18
    if (keyboard_check(vk_shift))
19
    {
20
        debug_print("Did not listen to prophecy");
21
        global.flag[203 skipped_prophecy] = 1;
22
    }
23
    
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);
24
}
25
prophecyactive = false;
26
roomglow = instance_create(0, 0, obj_roomglow);
27
prophecy = [];
28
encounterflag = 1795;
29
encounterno = 150;
30
if (global.flag[encounterflag] != 1)
31
{
32
    guei = instance_create(x, y, obj_encounter_guei_alt);
33
    guei.trig = "guei";
34
    guei.encounterflag = encounterflag;
35
    guei.encounterno = encounterno;
36
}
37
scr_walkntalk_create();
38
cutscene = 0;
39
if (global.plot == 126)
40
{
41
    cutscene = 2;
42
    debug_print("got the last one");
43
}
44
if (global.plot > 126)
45
    cutscene = 999;
46
roomloop = false;
47
npccon = -1;
48
init = 0;
49
makesolid = false;
50
loccheck = false;
51
if (global.plot >= 151)
52
{
53
    npccon = 0;
54
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
55
        loccheck = true;
56
    makesolid = true;
57
    var spritesArray = layer_get_all_elements("debug_assets");
58
    for (var i = 0; i < array_length(spritesArray); i++)
59
    {
60
        if (layer_sprite_get_sprite(spritesArray[i]) == 385)
61
            bibliox = scr_makenpc_fromasset(spritesArray[i]);
62
        if (layer_sprite_get_sprite(spritesArray[i]) == 5585)
63
            cup = scr_makenpc_fromasset(spritesArray[i]);
64
    }
65
}
66
ncon = 0;
67
actreminder = 0;
68
if (global.flag[1639] == 1)
69
    actreminder = 99;