Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b3camerashop_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 (obj_board_camera.con == 0 && suwalk == 0)
6
    {
7
        
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", 7.5, 6, 2);
8
        ralsei.follow = false;
9
        
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; } } } }
("ralsei", 3.5, 6, 2);
10
        suwalk = 6;
11
    }
12
    if (sndpause == 0 && obj_board_camera.con == 0)
13
    {
14
        sndpause = 1;
15
        snd_pause(global.currentsong[1]);
16
    }
17
    if (sndpause == 1 && obj_board_camera.con != 0)
18
    {
19
        sndpause = 0;
20
        snd_resume(global.currentsong[1]);
21
    }
22
    if (goodtalk == 0 && obj_board_camera.con == 0)
23
    {
24
        goodtimer++;
25
        if (goodtimer == 30)
26
        {
27
            var sutalk = stringsetloc(
Now THIS is good.
"Now THIS is good.", "obj_b3camerashop_slash_Step_0_gml_44_0"
);
28
            
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", 2, 80);
29
            goodtalk = 1;
30
        }
31
    }
32
    if (con == 0 && obj_board_camera.con == 0)
33
    {
34
        if (visitinit == 0)
35
        {
36
            shopstring = string1;
37
            if (!i_ex(lancer1))
38
            {
39
                shopstring = "";
40
                textcomplete = true;
41
            }
42
            visitinit = 1;
43
        }
44
    }
45
    if (!i_ex(lancer2))
46
    {
47
        if (shopstring == string1 && string2said == 0)
48
        {
49
            string2said = 1;
50
            debug_print("lancer2 get");
51
            shopstring = string2;
52
            if (pipstring == pipstring2)
53
                pipstring = "";
54
            textcomplete = 0;
55
            texttimer = 0;
56
        }
57
    }
58
    if (obj_board_inventory.lancer == 2 && susietalk == 0)
59
    {
60
        susietalk = 1;
61
        var sutalk = stringsetloc(
Hell yeah, 2 Lancers!
"Hell yeah, 2 Lancers!", "obj_b3camerashop_slash_Step_0_gml_82_0"
);
62
        
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", 2, 60);
63
    }
64
    if (pipstring == pipstring2 && piptalk == 0)
65
    {
66
        piptalk = 1;
67
        var sutalk = stringsetloc(
Least Lancer's here.
"Least Lancer's here.", "obj_b3camerashop_slash_Step_0_gml_90_0"
);
68
        
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", 2, 60);
69
    }
70
}
71
else
72
{
73
    if (pipstring == pipstring2)
74
        pipstring = "";
75
    suwalk = 0;
76
    timer = 0;
77
    texttimer = 0;
78
    visitinit = 0;
79
    textcomplete = false;
80
}