Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2loverbridge_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 (con == 0 && obj_board_camera.con == 0 && kris.boat == false)
6
    {
7
        with (obj_board_trigger)
8
        {
9
            if (extflag == "b2loverbridge")
10
            {
11
                if (place_meeting(x, y, obj_mainchara_board))
12
                {
13
                    var _kris = instance_place(x, y, obj_mainchara_board);
14
                    if (_kris.name == "kris")
15
                        other.con++;
16
                }
17
            }
18
        }
19
    }
20
    if (con == 1)
21
    {
22
        timer++;
23
        if (timer == 1)
24
        {
25
            with (obj_b2_ice_a1)
26
                killthis = 1;
27
            
scr_board_gridreset
scr_board_gridreset

function
scr_board_gridreset()
{ with (obj_board_controller) grid_reset = true; }
();
28
        }
29
        if (timer == 10)
30
        {
31
            ralsei.follow = true;
32
            
scr_board_caterpillar_interpolate_ralsei
scr_board_caterpillar_interpolate_ralsei

function
scr_board_caterpillar_interpolate_ralsei()
{ var _ralsei = obj_board_controller.ralsei_object; if (_ralsei != -1) { with (_ralsei) { for (i = 0; i < 75; i += 1) { remx[i] = x; remy[i] = y; facing[i] = 0; } } var _a = 0; var _dir = point_direction(_ralsei.x, _ralsei.y, x, y); repeat (_ralsei.ralsei_target) { _ralsei.remx[_a] = lerp(obj_board_controller.kris_object.x, _ralsei.x, _a / _ralsei.ralsei_target); _ralsei.remy[_a] = lerp(obj_board_controller.kris_object.y, _ralsei.y, _a / _ralsei.ralsei_target); if (_dir >= 45 && _dir < 135) _ralsei.facingdir[_a] = 2; else if (_dir >= 135 && _dir < 225) _ralsei.facingdir[_a] = 3; else if (_dir >= 225 && _dir < 315) _ralsei.facingdir[_a] = 0; else if (_dir >= 315 || _dir < 45) _ralsei.facingdir[_a] = 1; _a++; } } }
();
33
            tenna.y = 576;
34
            tenna.sprite_index = spr_tenna_faceaway;
35
            with (tenna)
36
                
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", 784, 484, 8, -1, "out");
37
            with (tenna)
38
                scr_delay_var("bounce", true, 8);
39
            global.flag[1022 tenna_board_absent] = 0;
40
            for (var i = 0; i < 2; i++)
41
            {
42
                block[i] = instance_create(x, y, obj_board_solid);
43
                with (block[i])
44
                {
45
                    setxy_board(1824 + (32 * i), 2848);
46
                    visible = true;
47
                    
scr_darksize
scr_darksize

function
scr_darksize()
{ var inst = id; if (argument_count) inst = argument0; inst.image_xscale = 2; inst.image_yscale = 2; }
();
48
                    sprite_index = spr_board_tennastatueblocker;
49
                    
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();
}
();
50
                }
51
            }
52
            var tetalk = stringsetloc(
I'm BACK! Onto ATLANTIS!
"I'm BACK! Onto ATLANTIS!", "obj_b2loverbridge_slash_Step_0_gml_63_0"
);
53
            var bub = 
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, 90);
54
            bub.y = 262 + cameray();
55
            with (bub)
56
                
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", 784, 484, 8, -1, "out");
57
            con = 2;
58
            timer = 0;
59
        }
60
    }
61
    if (con == 2)
62
    {
63
        timer++;
64
        if (timer == 90)
65
        {
66
            tenna.bounce = 1;
67
            var tetalk = stringsetloc(
... why is this RAINBOW so IMPURE!?
"... why is this RAINBOW so IMPURE!?", "obj_b2loverbridge_slash_Step_0_gml_79_0"
);
68
            var bub = 
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);
69
            con = 3;
70
        }
71
    }
72
    if (suwalk == 0 && obj_board_camera.con == 0)
73
    {
74
        suwalktimer++;
75
        if (suwalktimer == 1)
76
            ralsei.follow = true;
77
        if (suwalktimer == 15)
78
        {
79
            if (susie.y > 264)
80
                
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", 1, 4, 0);
81
            else
82
                
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(3, 4), 4, 0);
83
            suwalk = 1;
84
        }
85
    }
86
}
87
else
88
{
89
    if (con == 2)
90
        con = 3;
91
    suwalk = 0;
92
    suwalktimer = 0;
93
}