Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_event_intro1_Step_0

(view raw script w/o annotations or w/e)
1
if (kris == 0)
2
    kris = 1185;
3
if (susie == 0)
4
{
5
    with (obj_caterpillarchara)
6
    {
7
        if (name == "susie")
8
            other.susie = id;
9
    }
10
}
11
if (ralsei == 0)
12
{
13
    with (obj_caterpillarchara)
14
    {
15
        if (name == "ralsei")
16
            other.ralsei = id;
17
    }
18
}
19
if (tenna == 0)
20
    tenna = obj_actor_tenna;
21
if (krboard == 0)
22
{
23
    with (obj_mainchara_board)
24
    {
25
        if (name == "kris")
26
            other.krboard = id;
27
    }
28
}
29
if (raboard == 0)
30
{
31
    with (obj_mainchara_board)
32
    {
33
        if (name == "ralsei")
34
            other.raboard = id;
35
    }
36
}
37
if (active)
38
{
39
    if (con == 0 && obj_board_camera.con == 0)
40
    {
41
        snd_free_all();
42
        timer = 0;
43
        con = 1;
44
    }
45
    if (con == 1)
46
    {
47
        timer++;
48
        if (timer == 1)
49
        {
50
            with (ralsei)
51
            {
52
                sprite_index = spr_ralsei_walk_right_unhappy;
53
                
scr_resetgameshowcharacter_delay
scr_resetgameshowcharacter_delay

function
scr_resetgameshowcharacter_delay()
{ var _x_smooth = 0; if (argument_count == 3) _x_smooth = 1; return
scr_script_delayed(scr_resetgameshowcharacter, argument1, argument0, _x_smooth);
}
("ralsei", 80);
54
            }
55
            var ratalk = stringsetloc(
Umm, can I finish reading the MANUAL?
"Umm, can I finish reading the MANUAL?", "obj_board_event_intro1_slash_Step_0_gml_29_0"
);
56
            
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; }
(ratalk, "ralsei", 2, 80);
57
        }
58
        if (timer == 60)
59
        {
60
            tenna.bounce = 1;
61
            var tetalk = stringsetloc(
No! For your adventure awaits...
"No! For your adventure awaits...", "obj_board_event_intro1_slash_Step_0_gml_35_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; }
(tetalk, "tenna", 2, 120);
63
        }
64
    }
65
    if (suwalk == 0 && obj_board_camera.con == 0)
66
    {
67
        suwalktimer++;
68
        if (suwalktimer == 1)
69
            raboard.follow = true;
70
        
scr_pathfind_end
scr_pathfind_end

function
scr_pathfind_end(arg0)
{ with (obj_mainchara_board) { if (name == arg0) { path_end(); path_target_x = -1; path_target_y = -1; is_moving_timer = 0; is_moving = false; } } }
("susie");
71
        if (suwalktimer >= 15)
72
        {
73
            suwalk = 1;
74
            
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(5, 6), 7, 0);
75
            with (obj_mainchara_board)
76
            {
77
                if (name == "susie")
78
                    sleepy = true;
79
            }
80
        }
81
    }
82
}
83
else
84
{
85
    if (con != 0)
86
        con = 999;
87
    suwalk = 0;
88
    suwalktimer = 0;
89
}