Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_credits_ch5_Create_0

(view raw script w/o annotations or w/e)
1
if (scr_is_switch_os())
2
    instance_create_depth(0, 0, 0, obj_switchAsyncHelper);
3
if (i_ex(obj_credits_ch5_audio))
4
{
5
    with (obj_credits_ch5_audio)
6
        clean_up();
7
}
8
_credits_audio = instance_create(0, 0, obj_credits_ch5_audio);
9
_credits_audio.add_event_listener(id);
10
_active = true;
11
con = 0;
12
timer = 0;
13
lyric = stringset(" ");
14
textalpha = 1;
15
creditalpha = 1;
16
trackpos = 0;
17
modifier = 0;
18
song1 = 0;
19
menugray = hexcolor(#949494);
20
y_pos = __view_get(e__VW.YView, 0);
21
x_pos = __view_get(e__VW.XView, 0) + (__view_get(e__VW.WView, 0) / 2);
22
line_height = 20;
23
title_credit[0] = stringsetloc(
DELTARUNE
"DELTARUNE", "obj_credits_ch5_slash_Create_0_gml_20_0"
);
24
title_credit[1] = stringsetloc(
Chapter 5
"Chapter 5", "obj_credits_ch5_slash_Create_0_gml_21_0"
);
25
title_credit[2] = stringset(" ");
26
title_credit[3] = stringsetloc(
by Toby Fox
"by Toby Fox", "obj_credits_ch5_slash_Create_0_gml_23_0"
);
27
continued_text[0] = stringset(" ");
28
continued_text[1] = stringset(" ");
29
continued_text[2] = stringset(" ");
30
continued_text[3] = stringset(" ");
31
year_alpha = 0;
32
credit_index = -1;
33
credits = generate_credits();
34
credits_con = 0;
35
paused = false;
36
37
start_visuals = function()
38
{
39
    with (obj_mainchara)
40
        visible = 0;
41
    var transition = instance_create(camerax() + (view_wport[0] / 2), cameray() + (view_hport[0] / 2), obj_credits_ch5_transition);
42
    with (transition)
43
    {
44
        nextroom = 53;
45
        quick_mode = 1;
46
        skiprunback = 1;
47
    }
48
};
49
50
if (global.plot >= 590)
51
{
52
    con = -1;
53
    start_visuals();
54
}
55
56
emit_event = function(arg0)
57
{
58
    if (arg0 != "timestamp_changed")
59
        exit;
60
    if (credit_index < (array_length(credits) - 1))
61
    {
62
        credit_index++;
63
    }
64
    else
65
    {
66
        _credits_audio.remove_event_listener(id);
67
        _active = false;
68
        global.plot = 590;
69
        start_visuals();
70
    }
71
};
72
73
enum e__VW
74
{
75
    XView,
76
    YView,
77
    WView,
78
    HView,
79
    Angle,
80
    HBorder,
81
    VBorder,
82
    HSpeed,
83
    VSpeed,
84
    Object,
85
    Visible,
86
    XPort,
87
    YPort,
88
    WPort,
89
    HPort,
90
    Camera,
91
    SurfaceID
92
}