Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_dw_garden_aqua_Create_0

related scripts: Create_0 Draw_0Other_11Step_0Step_1Step_2

(view raw script w/o annotations or w/e)
1
show_debug_message_concat("global.entrance=", global.entrance);
2
turnofflayers("CUT");
3
turnofflayers("DEBUG");
4
turnofflayers("NPC");
5
turnofflayers("ASSETS_DAPLANTZ");
6
setparty(1, 1);
7
con = 0;
8
timer = 0;
9
init = 0;
10
siner = 0;
11
endcustom = false;
12
dojumping = false;
13
landed = false;
14
endjumping = false;
15
knives = [];
16
seth = scr_marker_fromasset(findsprite(spr_seth_walk_down, "CUTSCENE1_ASSETS"), 0, 1);
17
aqua = scr_marker_fromasset(findsprite(spr_aqua_walk_left, "CUTSCENE1_ASSETS"), 0, 1);
18
aqua.autodepth = 0;
19
fl_left = -4;
20
fl_right = -4;
21
bush1 = scr_marker_fromasset(findsprite(spr_dw_aquaplant_25, undefined, #FFE5E5), 96669);
22
bush2 = scr_marker_fromasset(findsprite(spr_dw_aquaplant_25, undefined, #FFFF7A), 96669);
23
depth = 96660;
24
bush1.image_blend = c_white;
25
bush2.image_blend = c_white;
26
if (global.plot < 290)
27
    global.plot = 290;
28
if (global.plot == 291 || global.tempflag[51] == 1)
29
{
30
    con = 3;
31
    aqua.sprite_index = spr_aqua_walk_up;
32
    var targ = findspriteinfo(spr_aqua_walk_down, "CUTSCENE2_ASSETS_2", #47E6FF);
33
    setxy(targ.x, targ.y, aqua);
34
    safe_delete(seth);
35
    if (global.entrance == 0 && global.tempflag[51] == 1)
36
    {
37
        with (scr_marker_fancy(0, 0, 6500))
38
        {
39
            timer = 0;
40
            
scr_size
scr_size

function
scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{ with (arg2) { image_xscale = arg0; image_yscale = arg1; } }
(room_width, room_height);
41
            depth = 0;
42
            
43
            step_func = function()
44
            {
45
                timer++;
46
                var endtime = 8;
47
                image_alpha = lerp(1.2, 0, timer / endtime);
48
                if (timer == endtime)
49
                    instance_destroy();
50
            };
51
        }
52
        global.facing = 2;
53
        targ = findspriteinfo(spr_debug_krmarker, "DEBUG_ASSETS", #FF0087);
54
        with (obj_mainchara)
55
        {
56
            setxy(targ.x, targ.y);
57
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
58
        }
59
        with (obj_caterpillarchara)
60
        {
61
            if (name == "susie")
62
                setxy(targ.x - 6, targ.y + 32);
63
            if (name == "ralsei")
64
                setxy(targ.x - 2, targ.y + 84);
65
            
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, 1200, 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; } }
();
66
            
scr_caterpillar_facing
scr_caterpillar_facing

function
scr_caterpillar_facing(arg0)
{ with (obj_caterpillarchara) { for (i = 0; i < 25; i += 1) facing[i] = arg0; } }
(2);
67
            
scr_depth
scr_depth

function
scr_depth(arg0 = id, arg1 = 0)
{ with (arg0) depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10)); }
();
68
        }
69
    }
70
}
71
if (global.plot >= 292)
72
{
73
    global.tempflag[51] = 0;
74
    con = -1;
75
    safe_delete(aqua);
76
    safe_delete(seth);
77
}
78
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; }
("piano_ambience.ogg", 1);
79
bushCon = 0;
80
bushLeft = scr_makenpc_fromasset(findsprite(spr_pxwhite, "NPCs", #FF6565));
81
bushLeft.marker.visible = false;
82
bushtalk = 0;
83
bushRight = scr_makenpc_fromasset(findsprite(spr_pxwhite, "NPCs", #E9FF47));
84
bushRight.marker.visible = false;
85
var _bushes = findsprite_all(5977, "ASSETS_DAPLANTZ");
86
bushMarkers = [];
87
var dadep = layer_get_depth("ASSETS_BIG_PLANTS");
88
for (var i = 0; i < array_length(_bushes); i++)
89
{
90
    array_push(bushMarkers, scr_marker_fromasset(_bushes[i], dadep + 1));
91
    if (bushMarkers[i].x < 300)
92
        bushLeft.mybush = bushMarkers[i];
93
    else
94
        bushRight.mybush = bushMarkers[i];
95
}