Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2heartisland_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 (boated == false && kris.boat == true)
6
        boated = true;
7
    if (boated == true && kris.boat == false)
8
    {
9
        suwalk = 0;
10
        suwalktimer = 0;
11
        boated = false;
12
    }
13
    if (suwalk == 0 && obj_board_camera.con == 0 && kris.boat == false)
14
    {
15
        suwalktimer++;
16
        if (suwalktimer == 1)
17
            ralsei.follow = true;
18
        if (suwalktimer == 15)
19
        {
20
            
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", 288, 256, 0);
21
            susie.sleepy = true;
22
        }
23
    }
24
}
25
else
26
{
27
    suwalktimer = 0;
28
    suwalk = 0;
29
}
30
if (con == 1)
31
{
32
    if (global.flag[1022 tenna_board_absent] == 0)
33
    {
34
        if (obj_board_camera.con != 0)
35
            con = 1.1;
36
    }
37
    else
38
    {
39
        con = 99;
40
    }
41
}
42
if (con == 1.1 && obj_board_camera.con == 0)
43
    con = 1.2;
44
if (con == 1.2 && obj_board_camera.con != 0)
45
    con = 1.3;
46
if (con == 1.3 && obj_board_camera.con == 0)
47
{
48
    tenna.bounce = 1;
49
    var tetalk = stringsetloc(
So uh... the Tropic of Love...
"So uh... the Tropic of Love...", "obj_b2heartisland_slash_Step_0_gml_53_0"
);
50
    
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; }
(tetalk, "tenna", 2, 80);
51
    con = 2;
52
}
53
if (con == 2 && obj_board_camera.con != 0)
54
    con = 2.1;
55
if (con == 2.1 && obj_board_camera.con == 0)
56
{
57
    tenna.bounce = 1;
58
    var tetalk = stringsetloc(
Anyone else think that was cool? Haha...
"Anyone else think that was cool? Haha...", "obj_b2heartisland_slash_Step_0_gml_62_0"
);
59
    
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; }
(tetalk, "tenna", 2, 80);
60
    con = 3;
61
}
62
if (con == 3 && obj_board_camera.con != 0)
63
    con = 3.1;
64
if (con == 3.1 && obj_board_camera.con == 0)
65
    con = 3.2;
66
if (con == 3.2 && obj_board_camera.con != 0)
67
    con = 3.3;
68
if (con == 3.3 && obj_board_camera.con == 0)
69
{
70
    tenna.bounce = 1;
71
    var tetalk = stringsetloc(
Anyone?
"Anyone?", "obj_b2heartisland_slash_Step_0_gml_73_0"
);
72
    
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; }
(tetalk, "tenna", 2, 80);
73
    con = 99;
74
}