Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2westshop_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 (!i_ex(candy) && i_ex(pippins))
6
    {
7
        if (made == 0)
8
        {
9
            candy = instance_create_board(8, 4.5, obj_board_tvdinner);
10
            with (candy)
11
                setxy_board(3456, 448);
12
            made = 1;
13
        }
14
    }
15
    if (i_ex(candy))
16
        made = 1;
17
    if (obj_board_camera.con == 0 && suwalk == 0)
18
    {
19
        
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", choose(1, 2, 9, 10), 6, 0);
20
        suwalk = 6;
21
    }
22
    if (sndpause == 0 && obj_board_camera.con == 0)
23
    {
24
        sndpause = 1;
25
        snd_pause(global.currentsong[1]);
26
    }
27
    if (sndpause == 1 && obj_board_camera.con != 0)
28
    {
29
        sndpause = 0;
30
        snd_resume(global.currentsong[1]);
31
    }
32
    if (con == 0 && obj_board_camera.con == 0)
33
    {
34
        if (visitinit == 0)
35
            visitinit = 1;
36
    }
37
    if (keycon == 1 && obj_board_camera.shift == "none")
38
    {
39
        with (candy)
40
            tempblock = true;
41
        noblock = instance_create(3360, 572, obj_board_solid);
42
        noblock.image_xscale = 2;
43
        with (noblock)
44
            setxy_board();
45
        kris.cantleave = true;
46
        keycon = 2;
47
        keytimer = 0;
48
        forcedraw = 1;
49
    }
50
    if (keycon == 2)
51
    {
52
        var tetalk = stringsetloc(
Wait, there aren't any keys this time...
"Wait, there aren't any keys this time...", "obj_b2westshop_slash_Step_0_gml_66_0"
);
53
        
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, "ralsei", 2, 80);
54
        keycon = 3;
55
    }
56
    if (keycon == 3 && !i_ex(obj_couchwriter))
57
    {
58
        timer = 0;
59
        texttimer = 0;
60
        textcomplete = false;
61
        shopstring = string2;
62
        keycon = 4;
63
        keytimer = 0;
64
    }
65
    if (keycon == 4 && textcomplete)
66
    {
67
        keytimer++;
68
        if (keytimer == 30)
69
        {
70
            with (pippins)
71
            {
72
                snd_play_x(snd_board_mantle_dash_fast, 1, 1.8);
73
                snd_play_x(snd_board_splash, 0.4, 1.8);
74
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpvar_respect() { if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true; return ___lerpvar; }
("x", x, x - 480, 18, 2, "in");
75
                
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 40);
76
            }
77
        }
78
        if (keytimer > 30 && pippins.x <= board_tilex(-1))
79
        {
80
            with (candy)
81
            {
82
                tempblock = false;
83
                costfree = true;
84
            }
85
            kris.cantleave = false;
86
            safe_delete(noblock);
87
            shopstring = "";
88
            keycon = 5;
89
        }
90
    }
91
}
92
else
93
{
94
    suwalk = 0;
95
    timer = 0;
96
    texttimer = 0;
97
    visitinit = 0;
98
    textcomplete = false;
99
    made = 0;
100
    pocketcheck = 0;
101
}