Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_event_b2sphinx_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 (init == 0)
4
    init = 1;
5
if (inventory == 0)
6
    inventory = 1730;
7
if (con == 0)
8
    
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();
}
();
9
if (active)
10
{
11
    if (con == 1)
12
    {
13
        global.interact = 1;
14
        if (inventory.qcount < 2)
15
        {
16
            con = 99;
17
            talked++;
18
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
19
            msgsetloc(0, 
WHIFF...Delay 11 WHIFF...Delay 11 MY NOSE KNOWS YOU DIDN'T DO THE OTHER QUIZZES.Wait for input
"WHIFF..^1. WHIFF..^1. MY NOSE KNOWS YOU DIDN'T DO THE OTHER QUIZZES./", "obj_board_event_b2sphinx_slash_Step_0_gml_31_0"
);
20
            msgnextloc(
GO HIT THE BEACH AND SNIFF THEM OUT!Wait for inputClose Message
"GO HIT THE BEACH AND SNIFF THEM OUT!/%", "obj_board_event_b2sphinx_slash_Step_0_gml_32_0"
);
21
        }
22
        else
23
        {
24
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
25
            msgsetloc(0, 
ACHOO!Delay 11 ACHOO!Delay 11 MY NOSE KNOWS YOU FOUND THE OTHER QUIZZES.Wait for input
"ACHOO^1! ACHOO^1! MY NOSE KNOWS YOU FOUND THE OTHER QUIZZES./", "obj_board_event_b2sphinx_slash_Step_0_gml_37_0"
);
26
            msgnextloc(
NOW THERE'S JUST ONE LAST QUESTION...Wait for input
"NOW THERE'S JUST ONE LAST QUESTION.../", "obj_board_event_b2sphinx_slash_Step_0_gml_38_0"
);
27
            msgnextloc(
DO YOU WANT THESE POINTS,Delay 11 OR NOT!?Wait for inputClose Message
"DO YOU WANT THESE POINTS^1, OR NOT!?/%", "obj_board_event_b2sphinx_slash_Step_0_gml_39_0"
);
28
            con = 10;
29
        }
30
        if (global.flag[1022 tenna_board_absent] == 1)
31
        {
32
            con = 99;
33
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
34
            msgsetloc(0, 
...Wait for inputClose Message
".../%", "obj_board_event_b2sphinx_slash_Step_0_gml_47_0"
);
35
        }
36
        var b = bw_make();
37
        b.side = 1;
38
    }
39
    if (con == 10 && !bw_ex())
40
    {
41
        quiz = instance_create(x, y, obj_quizsequence);
42
        quiz.depth = 900000;
43
        quiz.extflag = "sphinx2";
44
        
scr_quizsetup
scr_quizsetup

function scr_quizsetup_full(arg0 = 3, arg1 = 0, arg2 = false, arg3 = 900000) { var __quiz = instance_create(0, 0, obj_quizsequence); if (
scr_debug())
arg1 = scr_quizdebug(arg1, arg2); __quiz.depth = arg3; __quiz.board4 = arg2; if (arg2) __quiz.newdepth = 100000;
scr_quizsetup(arg0, arg1);
return __quiz; } function
scr_quizsetup(arg0 = 3, arg1 = 0, arg2 = 27, arg3 = false)
{ with (obj_quizsequence) { if (arg3) { if (((arg2 - arg1) + 1) < arg0) arg0 = (arg2 - arg1) + 1; var _quizlist = ds_list_create(); randomize(); for (var i = arg1; i <= arg2; i++) ds_list_add(_quizlist, i); ds_list_shuffle(_quizlist); for (var i = 0; i < arg0; i++) quizQs[i] = ds_list_find_index(_quizlist, i); quiz_length = arg0; ds_list_clear(_quizlist); } else { if (
scr_debug())
arg1 = scr_quizdebug(arg1, false); for (var i = 0; i < arg0; i++) quizQs[i] = i + arg1; quiz_length = arg0; } } } function scr_quizadd(arg0) { with (obj_quizsequence) { quizQs[quiz_length] = arg0; quiz_length++; } } function scr_quizreplace(arg0, arg1) { with (obj_quizsequence) quizQs[arg0] = arg1; } function scr_quizdebug(arg0, arg1) { if (
scr_debug())
{ if (keyboard_check(ord("4")) || keyboard_check(vk_numpad1)) arg0 = 0; else if (keyboard_check(ord("5")) || keyboard_check(vk_numpad2)) arg0 = 3; else if (keyboard_check(ord("6")) || keyboard_check(vk_numpad3)) arg0 = 6; else if (keyboard_check(ord("7")) || keyboard_check(vk_numpad4)) arg0 = 9; else if (keyboard_check(ord("8")) || keyboard_check(vk_numpad5)) arg0 = 12; else return arg0; if (arg1) arg0 = (arg0 / 3) + 15; debug_print("Starting question overriden (" + string(arg0) + ")"); } return arg0; }
(3, 0, 10);
45
        con = 11;
46
        timer = 0;
47
    }
48
    if (con == 11)
49
        global.interact = 1;
50
    if (con == 11 && !i_ex(quiz))
51
    {
52
        timer++;
53
        if (timer == 10)
54
        {
55
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("no_name");
56
            msgsetloc(0, 
AND THAT'S THE FINAL QUIZ!Wait for input
"AND THAT'S THE FINAL QUIZ!/", "obj_board_event_b2sphinx_slash_Step_0_gml_72_0"
);
57
            msgnextloc(
IN A WAY,Delay 11 WE WERE ALL WINNERS...Wait for input
"IN A WAY^1, WE WERE ALL WINNERS.../", "obj_board_event_b2sphinx_slash_Step_0_gml_73_0"
);
58
            msgnextloc(
SO IF YOU DON'T MIND,Delay 11Wait for input
"SO IF YOU DON'T MIND^1,/", "obj_board_event_b2sphinx_slash_Step_0_gml_74_0"
);
59
            msgnextloc(
I'LL BE TAKING THAT ALL-EXPENSES-PAID TROPICAL VACATION!Wait for inputClose Message
"I'LL BE TAKING THAT ALL-EXPENSES-PAID TROPICAL VACATION!/%", "obj_board_event_b2sphinx_slash_Step_0_gml_75_0"
);
60
            var b = bw_make();
61
            b.side = 1;
62
            con = 12;
63
            timer = 0;
64
        }
65
    }
66
    if (con == 12)
67
    {
68
        if (!i_ex(glasses))
69
        {
70
            if (
scr_getmsgno
scr_getmsgno

function
scr_getmsgno()
{ if (instance_exists(obj_writer)) return obj_writer.msgno; }
() == 3)
71
            {
72
                glasses = 
scr_board_marker
scr_board_marker

function
scr_board_marker()
{ var _thismarker = instance_create(argument0, argument1, obj_board_marker); _thismarker.sprite_index = argument2; _thismarker.image_xscale = 2; _thismarker.image_yscale = 2; if (argument_count >= 4) _thismarker.image_speed = argument3; if (argument_count >= 5) { if (argument4 != -1) _thismarker.depth = argument4; } if (argument_count >= 6) _thismarker.image_xscale = argument5; if (argument_count >= 6) _thismarker.image_yscale = argument5; if (argument_count >= 7) _thismarker.animateonce = argument6; return _thismarker; }
(x + 36, y - 180, spr_board_sphinx_tenna_glasses, 0, depth - 1);
73
                with (glasses)
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; }
("y", y, other.y + 36, 30, 3, "out");
75
                obj_board_inventory.qcount = 0;
76
                snd_play_pitch(snd_item, 0.8);
77
            }
78
        }
79
        if (i_ex(glasses))
80
        {
81
            if (glasses.y >= (y + 36))
82
            {
83
                glasses.y = y + 36;
84
                con = 12.1;
85
            }
86
        }
87
    }
88
    if (con == 12.1 && !bw_ex())
89
    {
90
        timer++;
91
        var jumptime = 30;
92
        if (timer == 1)
93
        {
94
            safe_delete(glasses);
95
            sprite_index = spr_board_sphinx_tenna_floataway;
96
            nosedraw = false;
97
            
scr_jump_to_point
scr_jump_to_point

function
scr_jump_to_point(arg0, arg1, arg2, arg3, arg4 = 0)
{ var ___jump =
scr_jump_to_point_sprite(arg0, arg1, arg2, arg3, 0, 0);
with (___jump) { trackalpha = arg4; trackblend = arg4; trackindex = arg4; tracksprite = arg4; } return ___jump; }
(x, y - 86, 12, jumptime);
98
        }
99
        if (timer == (1 + jumptime))
100
        {
101
            snd_play(snd_board_splash);
102
            floating = true;
103
            vspeed = -0.01;
104
            friction = -0.02;
105
        }
106
        if (timer == (1 + jumptime + 15))
107
        {
108
            con = 13;
109
            kris.facing = 0;
110
            global.interact = 0;
111
            
scr_doom
scr_doom

function
scr_doom(arg0, arg1)
{ with (instance_create_depth(0, 0, 0, obj_doom)) { alarm[0] target = arg0; } }
(id, 300);
112
        }
113
    }
114
    if (con == 13)
115
    {
116
        if (y < (board_tiley(0) - (sprite_height * 2)))
117
        {
118
            debug_message("sphinx offscreen");
119
            instance_destroy();
120
        }
121
    }
122
    if (con == 99 && !bw_ex())
123
    {
124
        con = 0;
125
        global.interact = 0;
126
    }
127
}
128
else
129
{
130
}
131
if (floating)
132
    siner++;
133
if (i_ex(mysolid))
134
{
135
    mysolid.x = x + 12;
136
    mysolid.y = y + 10;
137
}