Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2pyramidrouxlsstore_Step_0

(view raw script w/o annotations or w/e)
1
if (su == 0)
2
{
3
    with (obj_mainchara_board)
4
    {
5
        if (name == "susie")
6
            other.su = id;
7
    }
8
}
9
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; } } }
();
10
if (kris_real == 0)
11
    kris_real = 1185;
12
if (susie_real == 0)
13
{
14
    with (obj_caterpillarchara)
15
    {
16
        if (name == "susie")
17
            other.susie_real = id;
18
    }
19
}
20
if (ralsei_real == 0)
21
{
22
    with (obj_caterpillarchara)
23
    {
24
        if (name == "ralsei")
25
            other.ralsei_real = id;
26
    }
27
}
28
if (tenna == 0)
29
{
30
    with (obj_actor_tenna)
31
        other.tenna = id;
32
}
33
if (active == 1)
34
{
35
    susietimer++;
36
    if (con == 0 && obj_board_camera.con == 0)
37
    {
38
        if (tetalker == 0)
39
            tetalker = 1;
40
        ralsei.follow = true;
41
        shopstring = stringsetloc(
LOOK. GUYSE. I'M#LOSTE. I DIDN'T#MEAN TO MAKE A SHOP.
"LOOK. GUYSE. I'M#LOSTE. I DIDN'T#MEAN TO MAKE A SHOP.", "obj_b2pyramidrouxlsstore_slash_Step_0_gml_22_0"
);
42
        if (made && !i_ex(block))
43
            shopstring = stringsetloc(
I HAVETH NOTHING.
"I HAVETH NOTHING.", "obj_b2pyramidrouxlsstore_slash_Step_0_gml_23_0"
);
44
        if (goaway == 0)
45
        {
46
            if (obj_b2loverscliff.con > 3)
47
            {
48
                goaway = 1;
49
                texttimer = 9999;
50
                shopstring = "";
51
                if (i_ex(block))
52
                    block.cost = 0;
53
                safe_delete(rouxlsmarker);
54
                safe_delete(tennasolid);
55
            }
56
        }
57
        if (activeinit == 0 && obj_board_camera.con == 0)
58
        {
59
            activeinit = 1;
60
            if (made == 0)
61
            {
62
                global.flag[1001 tiny_pyramid_state] = 0;
63
                instance_create_board(3, 4.5, obj_board_smokepuff);
64
                block = instance_create_board(3, 4.5, obj_board_store_key);
65
                block.sprite_index = spr_board_rouxlsblock;
66
                block.mytype = "rouxlsblock";
67
                block.cost = 1;
68
                if (goaway)
69
                    block.cost = 0;
70
                if (!goaway)
71
                {
72
                    rouxlsmarker = instance_create_board(5.5, 1.25, obj_board_marker);
73
                    rouxlsmarker.sprite_index = spr_board_rouxls;
74
                    rouxlsmarker.extflag = "photoless";
75
                    rouxlsmarker.image_speed = 0.05;
76
                    tennasolid = instance_create_board(5.5, 1.25, obj_board_solid);
77
                    tennasolid.sprite_index = spr_board_npc_tenna;
78
                    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(tennasolid);
79
                    with (rouxlsmarker)
80
                        
scr_depth_board
scr_depth_board

function
scr_depth_board()
{ depth = 1000000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10)); } function scr_board_depth() {
scr_depth_board();
}
();
81
                    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
(rouxlsmarker);
82
                    instance_create(304, 88, obj_board_smokepuff);
83
                }
84
                made = 1;
85
            }
86
            visit++;
87
            con = 1;
88
            if (goaway == 1)
89
            {
90
                shopstring = "";
91
                texttimer = 9999;
92
            }
93
        }
94
        if (susiewalkcon == 0)
95
        {
96
            susiewalkcon = 1;
97
            
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", 332, 236, 2);
98
        }
99
    }
100
}
101
else
102
{
103
    timer = 0;
104
    texttimer = 0;
105
    activeinit = 0;
106
    con = 0;
107
    susiewalkcon = 0;
108
    susietimer = 0;
109
}
110
if (!active)
111
{
112
    if (tetalker == 1)
113
    {
114
        tetimer++;
115
        if (tetimer == 5)
116
        {
117
            if (tennahere())
118
            {
119
                with (obj_actor_tenna)
120
                    bounce = 1;
121
                var tetalk = stringsetloc(
Who the heck was that?
"Who the heck was that?", "obj_b2pyramidrouxlsstore_slash_Step_0_gml_94_0"
);
122
                
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, 70);
123
            }
124
            tetalker = 2;
125
        }
126
    }
127
}