Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_b2d_intro_Step_0

(view raw script w/o annotations or w/e)
1
if (kris == 0)
2
{
3
    with (obj_mainchara_board)
4
    {
5
        if (name == "kris")
6
            other.kris = id;
7
    }
8
}
9
if (kr_real == 0)
10
{
11
    with (obj_mainchara)
12
        other.kr_real = id;
13
}
14
if (active == 1)
15
{
16
    if (con == 0 && obj_board_camera.con == 0)
17
    {
18
        con = -1;
19
        if (global.flag[1087 entered_ice_palace] == 0)
20
        {
21
            global.currentsong[0] = snd_init("glacier.ogg");
22
            global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
23
            mus_volume(global.currentsong[1], 0, 0);
24
            mus_volume(global.currentsong[1], 1, 60);
25
            fader = 
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; }
(board_tilex(0), board_tiley(0), spr_pxwhite, 0, 100000, 640);
26
            fader.image_blend = c_black;
27
            with (fader)
28
            {
29
                for (var i = 0; i < 6; i++)
30
                    scr_delay_var("image_alpha", 1 - (i / 5), 10 * i);
31
            }
32
            with (obj_gameshow_swordroute)
33
            {
34
                for (var i = 0; i < 6; i++)
35
                    scr_delay_var("screencolor", merge_color(c_black, #344FD0, i / 5), 10 * i);
36
            }
37
            with (obj_mainchara_board)
38
            {
39
                canfreemove = false;
40
                scr_delay_var("canfreemove", true, 50);
41
            }
42
            global.flag[1087 entered_ice_palace] = 1;
43
        }
44
        else
45
        {
46
            con = 1;
47
        }
48
    }
49
    if (con == 1)
50
    {
51
        obj_gameshow_swordroute.drawui = false;
52
        global.swordscreencolor = c_black;
53
        obj_gameshow_swordroute.screenalpha = 0;
54
        global.interact = 1;
55
        obj_mainchara_board.facing = 2;
56
        timer = 0;
57
        con = 2;
58
    }
59
    if (con == 2)
60
    {
61
        timer++;
62
        if (timer == 1)
63
        {
64
            var steps = 8;
65
            var delay = 15;
66
            for (var i = 0; i < steps; i++)
67
            {
68
                with (obj_gameshow_swordroute)
69
                    scr_delay_var("screencolor", merge_color(c_black, #334ED2, i / steps), delay * (i - 1));
70
            }
71
        }
72
        if (timer == 16)
73
            obj_gameshow_swordroute.screenalpha = 1;
74
        if (timer == 60)
75
        {
76
            transition.active = true;
77
            timer = 0;
78
            con = 3;
79
        }
80
    }
81
    if (con == 3)
82
    {
83
        if (transition.completed == true)
84
        {
85
            with (instance_create(1344, 1920, obj_board_screenColorChanger))
86
            {
87
                image_blend = #334BD2;
88
                setxy_board();
89
            }
90
            global.currentsong[0] = snd_init("glacier.ogg");
91
            global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
92
            mus_volume(global.currentsong[1], 0, 0);
93
            mus_volume(global.currentsong[1], 1, 60);
94
            global.interact = 0;
95
            obj_mainchara_board.facing = 0;
96
            obj_gameshow_swordroute.drawui = true;
97
            obj_gameshow_swordroute.skip = false;
98
            safe_delete(transitionmarker);
99
            con++;
100
        }
101
    }
102
}
103
else
104
{
105
}
106
if (con == 49.6)
107
{
108
    
scr_board_sword_repeat
scr_board_sword_repeat

function
scr_board_sword_repeat()
{ timer++; if (timer == 1) { with (obj_board_squaretransition) instance_destroy(); obj_mainchara_board.facing = 2; global.interact = 1; with (instance_create(board_tilex(0), board_tiley(-1), obj_puzzlecloset_tvturnon)) { width = 384; height = 288; } } if (timer == 15) { if (room == room_board_1_sword || room == room_board_2_sword || room == room_board_3_sword)
scr_musicer("board_ocean.ogg", 1, undefined, undefined, 60);
with (obj_puzzlecloset_tvturnon) turnon = true; snd = snd_play_x(snd_tv_poweron, 0.4, 0.5); snd_volume(snd, 0, 15); snd = snd_play_x(snd_tv_poweron, 0.6, 2); snd_volume(snd, 0, 15); } if (timer == 18) { with (obj_board_screenColorChanger) { if (x >= 128 && x <= 512 && y >= 64 && y <= 320) { init = 0; force = 8; active = 1; roomstart = 60; } } } if (timer < 30) global.interact = 1; if (timer == 30) { global.swordboardeath = 0; global.interact = 0; con++; } }
();
109
    if (timer == 15)
110
    {
111
        global.currentsong[0] = snd_init("glacier.ogg");
112
        global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
113
        mus_volume(global.currentsong[1], 0, 0);
114
        mus_volume(global.currentsong[1], 1, 60);
115
    }
116
}