Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_ch3_gachaunknown_Step_0

(view raw script w/o annotations or w/e)
1
var _timer = 120;
2
if (init == 0)
3
{
4
    with (
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(0, 0, spr_pxwhite, room_width, room_height, undefined, undefined, c_black, 0, undefined, undefined, 1))
5
        
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; }
("image_alpha", 2, 0, _timer);
6
    with (obj_fadein)
7
        instance_destroy();
8
    init = 1;
9
}
10
free++;
11
if (free == _timer)
12
    global.interact = 0;
13
roomleft = 640;
14
roomwidth = 2560;
15
roomtop = 480;
16
roomheight = 2880;
17
var looped = 0;
18
ilooped = false;
19
with (obj_mainchara)
20
{
21
    if (x > (other.roomleft + other.roomwidth))
22
    {
23
        x -= other.roomwidth;
24
        looped = true;
25
    }
26
    if (x < other.roomleft)
27
    {
28
        x += other.roomwidth;
29
        looped = true;
30
    }
31
    if (y > (other.roomtop + other.roomheight))
32
    {
33
        y -= other.roomheight;
34
        looped = true;
35
    }
36
    if (y < other.roomtop)
37
    {
38
        y += other.roomheight;
39
        looped = true;
40
    }
41
}
42
if (con == 0)
43
{
44
    var trig = 0;
45
    with (obj_trigger_interact)
46
    {
47
        if (extflag == "act")
48
        {
49
            if (myinteract == 3)
50
                trig = 1;
51
        }
52
    }
53
    if (trig == 1)
54
    {
55
        global.interact = 1;
56
        con = 1;
57
        
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");
58
        msgsetloc(0, 
* You used the machine.Wait for input
"* You used the machine./", "obj_ch3_gachaunknown_slash_Step_0_gml_55_0"
);
59
        msgnextloc(
* ...Delay 11 The capsule came out.Wait for input
"* ..^1. The capsule came out./", "obj_ch3_gachaunknown_slash_Step_0_gml_56_0"
);
60
        msgnextloc(
* Inside was something hard like lacquer.Wait for input
"* Inside was something hard like lacquer./", "obj_ch3_gachaunknown_slash_Step_0_gml_57_0"
);
61
        msgnextloc(
* It was a small,Delay 11 dark,Delay 11 triangle.Wait for input
"* It was a small^1, dark^1, triangle./", "obj_ch3_gachaunknown_slash_Step_0_gml_58_0"
);
62
        msgnextloc(
* You tried to take it...Wait for input
"* You tried to take it.../", "obj_ch3_gachaunknown_slash_Step_0_gml_59_0"
);
63
        msgnextloc(
* But,Delay 11 it slipped through your handWait for input
"* But^1, it slipped through your hand/", "obj_ch3_gachaunknown_slash_Step_0_gml_60_0"
);
64
        msgnextloc(
* And you couldn't find it anymore.Wait for inputClose Message
"* And you couldn't find it anymore./%", "obj_ch3_gachaunknown_slash_Step_0_gml_61_0"
);
65
        with (d_make())
66
            stay = 30;
67
    }
68
}
69
if (con == 1)
70
{
71
    if (i_ex(obj_writer))
72
        con = 1.5;
73
}
74
if (con == 1.5)
75
{
76
    if (
scr_msgno_end
scr_msgno_end

function
scr_msgno_end(arg0 = 0)
{ if (i_ex(obj_writer)) { with (obj_writer) { if (msgno == arg0) { if (reachedend) return true; else return false; } } } else { return true; } }
(6))
77
    {
78
        mus_fade(global.currentsong[1], 10);
79
        con = 2;
80
    }
81
}
82
if (con == 2 && !d_ex())
83
{
84
    
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");
85
    msgsetloc(0, 
* You couldn't find^Delay 111^Delay 111^Delay 111^Delay 111^Delay 111\Delay 11n\nyour hand.
"* You couldn't find^1^1^1^1^1^1^1^1^1^1^1\n\nyour hand.", "obj_ch3_gachaunknown_slash_Step_0_gml_85_0"
);
86
    with (d_make())
87
    {
88
        global.typer = 36;
89
        skippable = false;
90
    }
91
    con = 3;
92
}
93
if (con == 3)
94
{
95
    with (obj_writer)
96
    {
97
        rate = 4;
98
        if (rate == 4)
99
            other.con = 4;
100
    }
101
}
102
if (con == 4)
103
{
104
    if (
scr_msgno_end
scr_msgno_end

function
scr_msgno_end(arg0 = 0)
{ if (i_ex(obj_writer)) { with (obj_writer) { if (msgno == arg0) { if (reachedend) return true; else return false; } } } else { return true; } }
(0))
105
        con = 5;
106
}
107
if (con == 5)
108
{
109
    timer++;
110
    if (timer == 30)
111
    {
112
        fade = 
scr_marker_ext
scr_marker_ext

function
scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{ var thismarker = instance_create(arg0, arg1, obj_marker); with (thismarker) { depth = arg8; sprite_index = arg2; image_speed = arg5; image_xscale = arg3; image_yscale = arg4; image_index = arg6; image_blend = arg7; image_alpha = arg11; if (arg9)
scr_depth();
} if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker; }
(camerax(), cameray(), spr_pxwhite, 640, 480, 0, 0, c_black, -40);
113
        fade.image_alpha = 0;
114
        with (fade)
115
        {
116
            scr_delay_var("image_alpha", 0.2, 5);
117
            scr_delay_var("image_alpha", 0.4, 10);
118
            scr_delay_var("image_alpha", 0.6000000000000001, 15);
119
            scr_delay_var("image_alpha", 0.8, 20);
120
            scr_delay_var("image_alpha", 1, 25);
121
        }
122
        scr_delay_var("con", 6, 40);
123
    }
124
}
125
if (con == 6)
126
{
127
    global.flag[1226 got_1225_room] = 1;
128
    with (instance_create(obj_mainchara.x - 80, obj_mainchara.y - 80, obj_doorAny))
129
    {
130
        image_xscale = 999;
131
        image_yscale = 999;
132
        doorRoom = room_dw_ranking_b;
133
        doorFadeMusic = 1;
134
        doorEntrance = 5;
135
    }
136
    global.interact = 0;
137
    con = 7;
138
}
139
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
140
{
141
}