Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_board_1_sword_manager_Step_0

(view raw script w/o annotations or w/e)
1
if (swordcon == 0)
2
{
3
    if (obj_mainchara_board.swordlv == 4)
4
    {
5
        mus_volume(global.currentsong[1], 0, 60);
6
        mus_play_ext("board_ocean.ogg", 1, 1);
7
        swordcon = 1;
8
    }
9
}
10
if (con == 0)
11
{
12
    obj_gameshow_swordroute.screencolor = c_black;
13
    obj_gameshow_swordroute.drawui = false;
14
    global.interact = 1;
15
    obj_mainchara_board.facing = 2;
16
    timer = 0;
17
    con = 1;
18
}
19
if (con == 1)
20
{
21
    timer++;
22
    if (timer == 1)
23
    {
24
        var steps = 8;
25
        var delay = 15;
26
        for (var i = 0; i < steps; i++)
27
        {
28
            with (obj_gameshow_swordroute)
29
                scr_delay_var("screencolor", merge_color(c_black, #FFD864, i / steps), delay * (i - 1));
30
        }
31
    }
32
    if (timer == 60)
33
    {
34
        transition.active = true;
35
        timer = 0;
36
        con = 2;
37
    }
38
}
39
if (con == 2)
40
{
41
    if (transition.completed == true)
42
    {
43
        snd_free_all();
44
        global.currentsong[0] = snd_init("board_ocean.ogg");
45
        global.currentsong[1] = mus_loop_ext(global.currentsong[0], 1, 1);
46
        global.interact = 0;
47
        obj_mainchara_board.facing = 0;
48
        obj_gameshow_swordroute.drawui = true;
49
        obj_gameshow_swordroute.skip = false;
50
        safe_delete(transition);
51
        con++;
52
    }
53
}
54
if (con == 10)
55
    
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++; } }
();