Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b1swordconnector_Step_0

(view raw script w/o annotations or w/e)
1
scr_board_populatevars
scr_board_populatevars

function
scr_board_populatevars()
{ if (!variable_instance_exists(id, "kris")) kris = 0; if (!variable_instance_exists(id, "susie")) susie = 0; if (!variable_instance_exists(id, "ralsei")) ralsei = 0; if (kris == 0) { with (obj_mainchara_board) { if (name == "kris") other.kris = id; } } if (ralsei == 0) { with (obj_mainchara_board) { if (name == "ralsei") other.ralsei = id; } } if (susie == 0) { with (obj_mainchara_board) { if (name == "susie") other.susie = id; } } }
();
2
scr_gameshow_populatevars
scr_gameshow_populatevars

function
scr_gameshow_populatevars()
{ if (!variable_instance_exists(id, "kr_real")) kr_real = 0; if (!variable_instance_exists(id, "su_real")) su_real = 0; if (!variable_instance_exists(id, "ra_real")) ra_real = 0; if (!variable_instance_exists(id, "tenna")) tenna = 0; if (kr_real == 0) { with (obj_mainchara) other.kr_real = id; } if (su_real == 0) { with (obj_caterpillarchara) { if (name == "susie") other.su_real = id; } } if (ra_real == 0) { with (obj_caterpillarchara) { if (name == "ralsei") other.ra_real = id; } } if (tenna == 0) { with (obj_actor_tenna) other.tenna = id; } }
();
3
if (active == 1)
4
{
5
    if (suwalk == 0 && obj_board_camera.con == 0)
6
    {
7
        suwalktimer++;
8
        if (suwalktimer == 1)
9
            ralsei.follow = true;
10
        if (suwalktimer == 9)
11
        {
12
            
scr_pathfind_to_point
scr_pathfind_to_point

function
scr_pathfind_to_point(arg0, arg1, arg2)
{ var __destx = arg1 + 16; var __desty = arg2 + 16; if (arg1 < 12 && arg2 < 8) { __destx = 128 + (32 * arg1) + 16; __desty = 64 + (32 * arg2) + 16; } with (obj_mainchara_board) { if (name == arg0) { path_end(); is_moving_timer = 0; is_moving = true; path_target_x = __destx; path_target_y = __desty; follow = false; if (argument_count == 4) { if (argument3 != -1) path_end_facing = argument3; } if (argument_count == 5) { if (argument4 != -1) allow_diagonals = argument4; } } } }
("susie", irandom_range(4, 9) + choose(0, 0, 0, 0, 1), choose(3, 4), 0);
13
            susie.sleepy = true;
14
        }
15
    }
16
    if (con == 0 && obj_board_camera.con == 0)
17
    {
18
        timer++;
19
        if (timer == 220)
20
        {
21
            timer = 0;
22
            con = 2;
23
        }
24
    }
25
    if (con == 2 && !instance_exists(obj_gameover_minigame))
26
    {
27
        timer++;
28
        if (timer == 1)
29
        {
30
            su_real.sprite_index = su_real.rsprite;
31
            var sutalk = stringsetloc(
Man, it'd be cool to have, like, a weapon.
"Man, it'd be cool to have, like, a weapon.", "obj_b1swordconnector_slash_Step_0_gml_70_0"
);
32
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(sutalk, "susie", 1, 120);
33
        }
34
        if (timer == 120)
35
        {
36
            var sutalk = stringsetloc(
You could like... cut everything down.
"You could like... cut everything down.", "obj_b1swordconnector_slash_Step_0_gml_45_0"
);
37
            
scr_couchtalk
scr_couchtalk

function scr_couchclear(arg0) { with (obj_couchwriter) { if (speaker == arg0) instance_destroy(); } } function
scr_couchtalk(arg0, arg1)
{ var ix = -1; var iy = -1; if (argument_count >= 6) { ix = argument4; iy = argument5; } var couchtext = instance_create_depth(ix, iy, 5000, obj_couchwriter); couchtext.mystring = arg0; couchtext.speaker = arg1; if (argument_count >= 3) couchtext.cleartext = argument2; if (argument_count >= 4) couchtext.drawtime = argument3; if (argument_count >= 7) couchtext.customsnd = argument6; if (argument_count >= 8) couchtext.customcolor = argument7; if (argument_count >= 9) couchtext.talkrate = argument8; if (argument_count >= 10) couchtext.talklength = argument9; return couchtext; }
(sutalk, "susie", 1, 120);
38
        }
39
        if (timer == 200)
40
        {
41
            
scr_resetgameshowcharacter
scr_resetgameshowcharacter

function
scr_resetgameshowcharacter(arg0)
{ if (room == room_dw_puzzlecloset_3) exit; var _name = arg0; var _smooth = 0; var __found = 0; if (argument_count == 2) _smooth = argument1; if (_name == "kris" || _name == "kr" || _name == "k" || _name == "Kris" || _name == "Kr" || _name == "K" || _name == "all") { var _krx = 248; var _kry = 400; if (
scr_swordroom())
{ _krx = 300; _kry = 298; } with (obj_mainchara) { if (_smooth == 0) { setxy(_krx, _kry); } else {
scr_lerpvar("x", x, _krx, _smooth);
scr_lerpvar("y", y, _kry, _smooth);
} fun = true; ignoredepth = true; depth = 95240; sprite_index = spr_krisu_dark; image_speed = 0; image_index = 0; if (
scr_swordroom())
{ sprite_index = spr_krisu_holdcontroller; depth = 96260; }
scr_darksize();
__found = 1; } } if (_name == "susie" || _name == "su" || _name == "Susie" || _name == "Su" || _name == "S" || _name == "s" || _name == "all") { with (obj_caterpillarchara) { if (name == "susie") { fun = true; ignoredepth = true; depth = 95165; var _sux = 140; var _suy = 392; if (_smooth == 0) { setxy(_sux, _suy); } else {
scr_lerpvar("x", x, _sux, _smooth);
scr_lerpvar("y", y, _suy, _smooth);
} sprite_index = spr_susie_walk_up_dw; image_speed = 0; image_index = 0;
scr_darksize();
__found = 1; } } } if (_name == "ralsei" || _name == "ra" || _name == "Ralsei" || _name == "Ra" || _name == "R" || _name == "r" || _name == "all") { with (obj_caterpillarchara) { if (name == "ralsei") { fun = true; ignoredepth = true; depth = 95145; var _rax = 342; var _ray = 396; if (_smooth == 0) { setxy(_rax, _ray); } else {
scr_lerpvar("x", x, _rax, _smooth);
scr_lerpvar("y", y, _ray, _smooth);
} sprite_index = spr_ralsei_walk_up; image_speed = 0; image_index = 0;
scr_darksize();
__found = 1; } } } if (_name == "tenna" || _name == "Tenna" || _name == "te" || _name == "t" || _name == "Te" || _name == "T" || _name == "all") ...
("susie");
42
            con = 3;
43
        }
44
    }
45
}
46
else
47
{
48
    timer = 0;
49
    if (con > 1)
50
        con = 99;
51
    suwalk = 0;
52
    suwalktimer = 0;
53
}