Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_teevie_shuttahmaze_Create_0

(view raw script w/o annotations or w/e)
1
encounterflag = 586;
2
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
3
{
4
    
scr_setparty
scr_setparty

function
scr_setparty(arg0, arg1, arg2)
{ 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);
5
    instance_create(x, y, obj_musicer_teevie);
6
}
7
timer = 0;
8
con = 0;
9
zap1 = 0;
10
zap2 = 0;
11
zap1t = 0;
12
zap2t = 0;
13
maketrig = false;
14
trigd = 0;
15
firsthop = 0;
16
laughcon = 0;
17
18
function movejump(arg0, arg1, arg2 = 20)
19
{
20
    with (arg0)
21
    {
22
        image_index = 1;
23
        scr_delay_var("image_index", 2, 2);
24
        scr_delay_var("image_index", 3, 4);
25
        scr_delay_var("image_index", 4, 6);
26
        scr_delay_var("image_index", 5, 8);
27
        scr_delay_var("image_index", 6, arg2 - 8);
28
        scr_delay_var("image_index", 7, arg2 - 4);
29
        scr_delay_var("image_index", 8, arg2 - 2);
30
        if (arg1 == 0)
31
            scr_lerpvar_respect("y", y, y + 160, arg2, 2, "out");
32
        if (arg1 == 1)
33
            scr_lerpvar_respect("x", x, x + 200, arg2, 2, "out");
34
        if (arg1 == 2)
35
            scr_lerpvar_respect("y", y, y - 160, arg2, 2, "out");
36
        if (arg1 == 3)
37
            scr_lerpvar_respect("x", x, x - 200, arg2, 2, "out");
38
    }
39
}
40
41
cheer = 0;
42
cheervol = 0;
43
boo = 0;
44
boovol = 0;
45
cheer2 = 0;
46
cheer2vol = 0;
47
trcon = 0;
48
trtimer = 0;
49
tinycrowd = 0;
50
trcol = 0;
51
tralpha = 0;
52
trscale = 0;
53
treasure = instance_create(82, 898, obj_trigger_interact);
54
with (treasure)
55
{
56
    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
57
    sprite_index = spr_treasurebox;
58
    image_index = 0;
59
    image_speed = 0;
60
    visible = true;
61
    
scr_depth
scr_depth

function
scr_depth()
{ if (argument_count > 0) { with (argument0) depth = 100000 - ((y * 10) + (sprite_height * 10)); } else { depth = 100000 - ((y * 10) + (sprite_height * 10)); } }
();
62
}
63
treasuresolid = instance_create(80, 880, obj_solidblocksized);
64
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(1, 2, treasuresolid);
65
if (global.flag[1004 got_crowd_treasure] == 1)
66
{
67
    trcon = 2;
68
    treasure.myinteract = 3;
69
    treasure.image_index = 1;
70
    image_blend = c_white;
71
    tralpha = 1;
72
    trscale = 1;
73
}
74
if (global.flag[1005 found_maze_crowd] == 1)
75
    laughcon = 1;
76
init = 0;
77
didviolence = false;
78
if (
scr_ch3_violencecheck
scr_ch3_violencecheck

function
scr_ch3_violencecheck()
{ var __violence = 0; if (global.flag[580] == 1) __violence++; if (global.flag[581] == 1) __violence++; if (global.flag[582] == 1) __violence++; if (global.flag[583] == 1) __violence++; if (global.flag[584] == 1) __violence++; if (global.flag[586 encount_zapper_shuttah] == 1) __violence++; if (global.flag[587 encount_first_watercooler] == 1) __violence++; if (global.flag[588] == 1) __violence++; if (global.flag[589 encount_first_zapper] == 1) __violence++; if (global.flag[590 encount_first_shadowguy] == 1) __violence++; if (global.flag[591 encount_first_ribbick] == 1) __violence++; if (global.flag[592 encount_second_watercooler] == 1) __violence++; if (global.flag[593 encount_second_ribbick] == 1) __violence++; debug_message("
scr_ch3_violencecheck() - Violence count: " + string(__violence));
return __violence; }
() >= 5)
79
    didviolence = true;