Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_dw_puzzlecloset_1_solidarea_Draw_0

(view raw script w/o annotations or w/e)
1
var sword = global.flag[1055 sword_route_progress];
2
if (global.flag[1091 susie_notice_sword] == 0)
3
{
4
    if (i_ex(obj_board_swordhitbox))
5
        global.flag[1091 susie_notice_sword] = 1;
6
}
7
with (trigger)
8
    other.pressed = place_meeting(x, y, obj_board_solid);
9
var drawcorner = true;
10
if (i_ex(swordswitch))
11
{
12
    pressed = swordswitch.switchstate;
13
    drawcorner = false;
14
}
15
var smokecolor = 12446975;
16
if (pressed == 0)
17
{
18
    formation = 0;
19
    if (pressinit == 0)
20
    {
21
        snd_play(snd_board_splash);
22
        for (var i = 0; i < 3; i++)
23
        {
24
            with (instance_create(x + (i * 32), y, obj_board_smokepuff))
25
                image_blend = smokecolor;
26
            with (instance_create(x + (i * 32), y + 32 + 16, obj_board_smokepuff))
27
                image_blend = smokecolor;
28
        }
29
        for (var i = 0; i < 2; i++)
30
        {
31
            with (instance_create(x + (i * 32), y + 96, obj_board_smokepuff))
32
                image_blend = smokecolor;
33
        }
34
        pressinit = 1;
35
    }
36
}
37
if (pressed == 1)
38
{
39
    if (pressinit == 1)
40
    {
41
        snd_play(snd_board_splash);
42
        pressinit = 0;
43
        for (var i = 0; i < 3; i++)
44
        {
45
            with (instance_create(x + (i * 32), y, obj_board_smokepuff))
46
                image_blend = smokecolor;
47
            with (instance_create(x + (i * 32), y + 32 + 16, obj_board_smokepuff))
48
                image_blend = smokecolor;
49
        }
50
        for (var i = 0; i < 2; i++)
51
        {
52
            with (instance_create(x + (i * 32), y + 96, obj_board_smokepuff))
53
                image_blend = smokecolor;
54
        }
55
    }
56
    formation = 1;
57
}
58
if (susieexistsed == 0)
59
{
60
    if (i_ex(obj_mainchara_board))
61
        susieexistsed = 1;
62
}
63
if (neverpressed == 0 && view_current == 1 && susieexistsed == 1)
64
{
65
    if (formation == 1)
66
        neverpressed = 1;
67
    else
68
        nopresstimer++;
69
}
70
if (formation == 1)
71
    draw_sprite_ext(spr_dw_puzzlecloset_1_solidarea, formation, x, y, 2, 2, 0, c_white, 1);
72
if (drawcorner)
73
    draw_sprite_ext(spr_dw_puzzlecloset_mysterytile, 0, trigger.x, trigger.y, 2, 2, 0, c_white, 1);
74
if (neverpressed == 0 && nopresstimer > 1200)
75
{
76
    var amt = round(abs(sin(nopresstimer / 15) * 4)) / 8;
77
    var col = merge_color(#FEEA88, #F37432, amt);
78
    draw_sprite_ext(spr_pxwhite, 0, trigger.x + 8, trigger.y + 8, 16, 14, 0, col, 1);
79
    draw_sprite_ext(spr_pxwhite, 0, trigger.x + 8 + 2, trigger.y + 8 + 2, 12, 10, 0, #F37432, 1);
80
}
81
if (everpressed == 0 && pressed == 1)
82
    everpressed = 1;