Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_ch5_DW19B_Create_0

(view raw script w/o annotations or w/e)
1
plot_check_on = true;
2
plot_post = 398;
3
con = -1;
4
customcon = 0;
5
timer = 0;
6
init = 0;
7
turnofflayers("CUTSCENE");
8
if (
scr_debug
scr_debug

function
scr_debug()
{ return global.debug == 1; }
())
9
    
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++; } } function setparty(arg0 = false, arg1 = false, arg2 = false) { var kris = 1198; 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))
...
(1, 1);
10
prison_layer = layer_get_id("ASSETS_PRISON");
11
wallswitch = findsprite(spr_darkroom1_wallswitch, "ASSETS_PRISON");
12
if (plot_check_on == false || global.plot < plot_post)
13
{
14
    
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++; } } function setparty(arg0 = false, arg1 = false, arg2 = false) { var kris = 1198; 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))
...
(1);
15
    
scr_pan
scr_pan

function
scr_pan(arg0, arg1, arg2)
{ panner = instance_create(0, 0, obj_panner); panner.panmax = arg2; panner.panx = arg0; panner.pany = arg1; }
(0, 0, 0);
16
    con = 0;
17
    blackall = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(-5, -5, spr_whitepixel);
18
    blackall.image_xscale = room_width + 10;
19
    blackall.image_yscale = room_height + 10;
20
    blackall.image_blend = c_black;
21
    blackall.image_alpha = 0;
22
    pos_kr = findspriteinfo(spr_debug_krmarker, "CUTSCENE_ASSETS");
23
    pos_kr2 = findspriteinfo(spr_debug_krmarker, "CUTSCENE_ASSETS", c_red);
24
    pos_kr3 = findspriteinfo(spr_debug_krmarker, "CUTSCENE_ASSETS", c_lime);
25
    pos_su = findspriteinfo(spr_debug_sumarker, "CUTSCENE_ASSETS", c_white);
26
    pos_su2 = findspriteinfo(spr_debug_sumarker, "CUTSCENE_ASSETS", c_red);
27
    pos_su3 = findspriteinfo(spr_debug_sumarker, "CUTSCENE_ASSETS", c_yellow);
28
    pos_su4 = findspriteinfo(spr_debug_sumarker, "CUTSCENE_ASSETS", c_black);
29
    with (obj_mainchara)
30
    {
31
        x = other.pos_kr.x;
32
        y = other.pos_kr.y;
33
        cutscene = 1;
34
        global.facing = 0;
35
    }
36
    with (obj_caterpillarchara)
37
    {
38
        if (name == "susie")
39
        {
40
            fun = 1;
41
            x = other.pos_su.x;
42
            y = other.pos_su.y;
43
            
scr_caterpillar_interpolate
scr_caterpillar_interpolate

function
scr_caterpillar_interpolate(arg0 = "none")
{ if (arg0 == "all") { with (obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else if (arg0 == "none") { if (object_index == obj_caterpillarchara) scr_caterpillar_interpolate_old(); } else { with (obj_caterpillarchara) { if (name == arg0) scr_caterpillar_interpolate_old(); } } } function scr_caterinterp(arg0 = "none") {
scr_caterpillar_interpolate(arg0);
} function scr_caterpillar_interpolate_old() { var _newfacing = direction_to_object_bbox(id, 1198, true); remx[0] = obj_mainchara.x; remy[0] = obj_mainchara.y; facing[0] = _newfacing; for (var _iaia = target; _iaia > 0; _iaia -= 1) { remx[_iaia] = lerp(obj_mainchara.x, x + halign, _iaia / target); remy[_iaia] = lerp(obj_mainchara.y, y + valign, _iaia / target); facing[_iaia] = _newfacing; } }
();
44
            sprite_index = dsprite;
45
        }
46
    }
47
}
48
else
49
{
50
    con = 999;
51
}
52
pos_moss = findspriteinfo(spr_whitepixel, "CUTSCENE_ASSETS", c_lime);
53
moss_marker = 
scr_dark_marker
scr_dark_marker

function
scr_dark_marker(arg0, arg1, arg2)
{ thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { sprite_index = arg2; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(pos_moss.x, pos_moss.y, spr_moss);
54
moss_marker.depth = 900000;
55
moss_spawners = findspriteinfo_all(2792);
56
moss_spawners = 
scr_array_shuffle
scr_array_shuffle

function
scr_array_shuffle(arg0)
{ var _len = array_length(arg0); var _last = 0; var _i = 0; while (_len) { _i = irandom(--_len); _last = arg0[_len]; arg0[_len] = arg0[_i]; arg0[_i] = _last; } return arg0; }
(moss_spawners);