Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_leave_Step_0

(view raw script w/o annotations or w/e)
1
if (con == 10)
2
{
3
    mus_volume(global.currentsong[1], 0, 30);
4
    if (instance_exists(obj_mainchara))
5
    {
6
        obj_mainchara.visible = 0;
7
        kr_actor = instance_create_depth(obj_mainchara.x, obj_mainchara.y, obj_mainchara.depth, obj_actor);
8
        kr_actor.sprite_index = obj_mainchara.sprite_index;
9
        kr_actor.__x = kris_x + 6;
10
        kr_actor.__y = kris_y + 20;
11
        with (kr_actor)
12
        {
13
            
scr_set_facing_sprites
scr_set_facing_sprites

function
scr_set_facing_sprites(arg0)
{ _actorname = arg0; name = arg0; if (is_string(_actorname)) { if (_actorname == "kris") { name = "kris"; if (global.darkzone == 0) _actorname = "krislight"; if (global.darkzone == 1) _actorname = "krisdark"; } if (_actorname == "susie") { name = "susie"; if (global.darkzone == 0) { _actorname = "susielight"; if (global.chapter >= 2) _actorname = "susielighteyes"; } if (global.darkzone == 1) { if (global.chapter == 1) _actorname = "susiedark"; if (global.chapter >= 2) _actorname = "susiedarkeyes"; } } if (_actorname == "ralsei") { name = "ralsei"; if (global.chapter <= 1) _actorname = "ralseihat"; if (global.chapter > 1) _actorname = "ralseinohat"; } if (_actorname == "noelle") { name = "noelle"; if (global.darkzone == 0) _actorname = "noellelight"; if (global.darkzone == 1) _actorname = "noelledark"; } if (_actorname == "berdly") { name = "berdly"; if (global.darkzone == 0) _actorname = "berdlylight"; if (global.darkzone == 1) _actorname = "berdlydark"; } if (_actorname == "krislight") { usprite = spr_krisu; rsprite = spr_krisr; dsprite = spr_krisd; lsprite = spr_krisl; } if (_actorname == "krisdark") { usprite = spr_krisu_dark; rsprite = spr_krisr_dark; dsprite = spr_krisd_dark; lsprite = spr_krisl_dark; if (global.chapter == 3) { if (
scr_flag_get(1076) == 1 || 
scr_flag_get(1077) == 1)
usprite = spr_krisu_dark_cool; } } if (_actorname == "susielight") { usprite = spr_susieu; rsprite = spr_susier; dsprite = spr_susied; lsprite = spr_susiel; } if (_actorname == "susielighteyes") { usprite = spr_susie_walk_up_lw; rsprite = spr_susie_walk_right_lw; dsprite = spr_susie_walk_down_lw; lsprite = spr_susie_walk_left_lw; } if (_actorname == "susiedark") { usprite = spr_susieu_dark; rsprite = spr_susier_dark; dsprite = spr_susied_dark; lsprite = spr_susiel_dark; specialsprite[4] = spr_susie_shock_r; specialsprite[5] = spr_susie_shock; } if (_actorname == "susiedarkeyes") { usprite = spr_susie_walk_up_dw; rsprite = spr_susie_walk_right_dw; ...
("kris");
14
            fun = 1;
15
            image_speed = 0.25;
16
            
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
(__x, __y, 10);
17
        }
18
    }
19
    if (instance_exists(obj_caterpillarchara) && 
scr_havechar
scr_havechar

function
scr_havechar(arg0)
{ var checker = arg0; if (checker == "susie" || checker == "su" || checker == "s") checker = 2; if (checker == "ralsei" || checker == "ra" || checker == "r") checker = 3; if (checker == "noelle" || checker == "no" || checker == "n") checker = 4; _rreturn = 0; if (global.char[0] == checker) _rreturn = 1; if (global.char[1] == checker) _rreturn = 1; if (global.char[2] == checker) _rreturn = 1; return _rreturn; }
(2))
20
    {
21
        su_actor = instance_create_depth(global.cinstance[0].x, global.cinstance[0].y, global.cinstance[0].depth, obj_actor);
22
        su_actor.__x = sus_x;
23
        su_actor.__y = sus_y + 8;
24
        with (su_actor)
25
        {
26
            sprite_index = global.cinstance[0].sprite_index;
27
            
scr_set_facing_sprites
scr_set_facing_sprites

function
scr_set_facing_sprites(arg0)
{ _actorname = arg0; name = arg0; if (is_string(_actorname)) { if (_actorname == "kris") { name = "kris"; if (global.darkzone == 0) _actorname = "krislight"; if (global.darkzone == 1) _actorname = "krisdark"; } if (_actorname == "susie") { name = "susie"; if (global.darkzone == 0) { _actorname = "susielight"; if (global.chapter >= 2) _actorname = "susielighteyes"; } if (global.darkzone == 1) { if (global.chapter == 1) _actorname = "susiedark"; if (global.chapter >= 2) _actorname = "susiedarkeyes"; } } if (_actorname == "ralsei") { name = "ralsei"; if (global.chapter <= 1) _actorname = "ralseihat"; if (global.chapter > 1) _actorname = "ralseinohat"; } if (_actorname == "noelle") { name = "noelle"; if (global.darkzone == 0) _actorname = "noellelight"; if (global.darkzone == 1) _actorname = "noelledark"; } if (_actorname == "berdly") { name = "berdly"; if (global.darkzone == 0) _actorname = "berdlylight"; if (global.darkzone == 1) _actorname = "berdlydark"; } if (_actorname == "krislight") { usprite = spr_krisu; rsprite = spr_krisr; dsprite = spr_krisd; lsprite = spr_krisl; } if (_actorname == "krisdark") { usprite = spr_krisu_dark; rsprite = spr_krisr_dark; dsprite = spr_krisd_dark; lsprite = spr_krisl_dark; if (global.chapter == 3) { if (
scr_flag_get(1076) == 1 || 
scr_flag_get(1077) == 1)
usprite = spr_krisu_dark_cool; } } if (_actorname == "susielight") { usprite = spr_susieu; rsprite = spr_susier; dsprite = spr_susied; lsprite = spr_susiel; } if (_actorname == "susielighteyes") { usprite = spr_susie_walk_up_lw; rsprite = spr_susie_walk_right_lw; dsprite = spr_susie_walk_down_lw; lsprite = spr_susie_walk_left_lw; } if (_actorname == "susiedark") { usprite = spr_susieu_dark; rsprite = spr_susier_dark; dsprite = spr_susied_dark; lsprite = spr_susiel_dark; specialsprite[4] = spr_susie_shock_r; specialsprite[5] = spr_susie_shock; } if (_actorname == "susiedarkeyes") { usprite = spr_susie_walk_up_dw; rsprite = spr_susie_walk_right_dw; ...
("susie");
28
            
scr_move_to_point_over_time
scr_move_to_point_over_time

function
scr_move_to_point_over_time(arg0, arg1, arg2)
{ _mmm = instance_create(x, y, obj_move_to_point); _mmm.target = id; _mmm.movex = arg0; _mmm.movey = arg1; _mmm.movemax = arg2; return _mmm; }
(__x, __y, 10);
29
        }
30
        with (global.cinstance[0])
31
            visible = 0;
32
    }
33
    with (obj_caterpillarchara)
34
    {
35
        if (visible == 1)
36
        {
37
            me = 
scr_dark_marker_depth
scr_dark_marker_depth

function
scr_dark_marker_depth(arg0, arg1, arg2, arg3)
{ thismarker = instance_create_depth(arg0, arg1, arg2, obj_marker); with (thismarker) { sprite_index = arg3; image_speed = 0; image_xscale = 2; image_yscale = 2; } return thismarker; }
(x, y, 510000, sprite_index);
38
            visible = 0;
39
            if (name == "ralsei")
40
            {
41
                me.sprite_index = spr_ralsei_wave_start;
42
                me.image_speed = 0.2;
43
                with (me)
44
                    
scr_script_delayed
scr_script_delayed

function
scr_script_delayed()
{ var __scriptdelay = instance_create(0, 0, obj_script_delayed); __scriptdelay.script = argument[0]; __scriptdelay.alarm[0] = argument[1]; __scriptdelay.target = id; for (var __i = 0; __i < (argument_count - 2); __i++) __scriptdelay.script_arg[__i] = argument[__i + 2]; __scriptdelay.arg_count = argument_count - 2; return __scriptdelay; }
(scr_var, 15, "sprite_index", spr_ralsei_wave_down);
45
            }
46
        }
47
    }
48
    contimer = 0;
49
    con = 11;
50
}
51
if (con == 11)
52
{
53
    contimer++;
54
    if (contimer >= 11)
55
    {
56
        con = 1;
57
        with (obj_actor)
58
            visible = 0;
59
        with (obj_dw_leave)
60
        {
61
            if (bottom == 1)
62
                draw_kris = 1;
63
        }
64
        with (obj_dw_leave)
65
        {
66
            if (bottom == 1)
67
                con = 15;
68
            else
69
                con = 1;
70
        }
71
    }
72
}
73
if (stopcon == 1)
74
{
75
    if (global.interact == 0 && obj_mainchara.y <= (obj_markerX.y - 8))
76
    {
77
        global.interact = 1;
78
        stopcon = 2;
79
        obj_mainchara.y = obj_markerX.y - 4;
80
        global.facing = 0;
81
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("ralsei");
82
        msgsetloc(0, 
Face N* Come back when you've finished your homework!Wait for input
"\\EN* Come back when you've finished your homework!/", "obj_dw_leave_slash_Step_0_gml_71_0"
);
83
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("susie", "K");
84
        msgnextloc(
Face K* (What's the point of having a room if you can't slack off in it?)Wait for inputClose Message
"\\EK* (What's the point of having a room if you can't slack off in it?)/%", "obj_dw_leave_slash_Step_0_gml_73_0"
);
85
        d_make();
86
    }
87
}
88
if (stopcon == 2 && !d_ex())
89
{
90
    stopcon = 1;
91
    global.interact = 0;
92
}