Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_pushableblock_Other_10

(view raw script w/o annotations or w/e)
1
if (global.interact == 0 && event == 0)
2
{
3
    movedir = global.facing;
4
    wd = sprite_width;
5
    ht = sprite_height;
6
    ix = 0;
7
    iy = 0;
8
    confirm = 1;
9
    if (movedir == 0)
10
    {
11
        ix = x + 2;
12
        iy = y + ht;
13
    }
14
    if (movedir == 1)
15
    {
16
        ix = x + wd;
17
        iy = y + 2;
18
    }
19
    if (movedir == 2)
20
    {
21
        ix = x + 2;
22
        iy = (y - ht) + 5;
23
    }
24
    if (movedir == 3)
25
    {
26
        ix = (x - wd) + 5;
27
        iy = y + 2;
28
    }
29
    if (collision_rectangle(ix, iy, ix + 15, iy + 15, obj_solidblock, false, true))
30
        confirm = 0;
31
    if (collision_rectangle(ix, iy, ix + 15, iy + 15, obj_interactablesolid, false, true))
32
        confirm = 0;
33
    if (collision_rectangle(ix, iy, ix + 15, iy + 15, obj_solidenemy, false, true))
34
        confirm = 0;
35
    snd_play(snd_noise);
36
    if (confirm == 1)
37
    {
38
        sprite_index = spr_npc_block;
39
        global.interact = 1;
40
        movecourse = 1;
41
        movetimer = 0;
42
    }
43
}
44
if (event == 1)
45
{
46
    myinteract = 3;
47
    global.msc = 0;
48
    global.typer = 6;
49
    global.fc = 0;
50
    global.fc = 0;
51
    global.interact = 1;
52
    sd = 0;
53
    if (global.flag[212 box_puzzle_state] == 0)
54
        global.msg[0] = 
* (You haven't decided if you want to do the puzzle yet.)Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_pushableblock_slash_Other_10_gml_61_0")
;
55
    if (global.plot >= 50)
56
        global.msg[0] = 
* (It won't move anymore.)Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_pushableblock_slash_Other_10_gml_66_0")
;
57
    if (global.flag[212 box_puzzle_state] == 2 && global.plot < 50)
58
    {
59
        global.typer = 30;
60
        global.fc = 1;
61
        global.fe = 9;
62
        global.msg[0] = 
* What!?Delay 11
* The puzzle!?Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_pushableblock_slash_Other_10_gml_74_0")
;
63
        global.msg[1] = 
Face 0* I thought you were on MY side,Delay 11 Kris.Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_pushableblock_slash_Other_10_gml_75_0")
;
64
        global.msg[2] = 
Face 2* ... wait a sec.Delay 11
* Those boxes...!Delay 11
* I get it!Wait for input
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_pushableblock_slash_Other_10_gml_76_0")
;
65
        global.msg[3] = 
* Wait a second,Delay 11 Kris!Wait for inputClose Message
scr_84_get_lang_string
scr_84_get_lang_string

function
scr_84_get_lang_string(arg0)
{ return ds_map_find_value(global.lang_map, arg0); }
("obj_pushableblock_slash_Other_10_gml_77_0")
;
66
        sd = 1;
67
        myinteract = 0;
68
        with (obj_boxpuzzle_event)
69
            con = 50;
70
    }
71
    mydialoguer = instance_create(0, 0, obj_dialoguer);
72
    if (sd == 1)
73
    {
74
        with (mydialoguer)
75
            side = 1;
76
    }
77
}