Deltarune (Chapter 1) script viewer

← back to main script listing

gml_Object_obj_mainchara_Create_0

(view raw script w/o annotations or w/e)
1
scr_depth
scr_depth

function
scr_depth()
{ depth = 100000 - ((y * 10) + (sprite_height * 10)); }
();
2
alarm[2]
 = 2;
gml_Object_obj_mainchara_Alarm_2.gml

global.lcharname =
Kris
scr_84_get_lang_string("scr_gamestart_slash_scr_gamestart_gml_345_0")
;
global.charname[0] = " "; global.charname[1] =
Kris
scr_84_get_lang_string("obj_initializer_slash_Create_0_gml_48_0")
;
global.charname[2] =
Susie
scr_84_get_lang_string("obj_initializer_slash_Create_0_gml_49_0")
;
global.charname[3] =
Ralsei
scr_84_get_lang_string("obj_initializer_slash_Create_0_gml_50_0")
;
3
global.currentroom = scr_get_id_by_room_index(room);
4
autorun = 0;
5
bg = 0;
6
if (instance_exists(obj_backgrounderparent))
7
    bg = 1;
8
stepping = 0;
9
stepped = 0;
10
battlemode = 0;
11
battleheart = instance_create(x, y, obj_overworldheart);
12
battleheart.image_alpha = 0;
13
battleheart.image_speed = 0;
14
battlealpha = 0;
15
becamebattle = 0;
16
darkmode = global.darkzone;
17
if (darkmode == 1)
18
{
19
    stepping = 1;
20
    image_xscale = 2;
21
    image_yscale = 2;
22
}
23
cutscene = 0;
24
press_l = 0;
25
press_r = 0;
26
press_d = 0;
27
press_u = 0;
28
px = 0;
29
py = 0;
30
wallcheck = 0;
31
wspeed = 3;
32
bwspeed = 3;
33
if (darkmode == 1)
34
{
35
    bwspeed = 4;
36
    wspeed = 4;
37
}
38
run = 0;
39
runtimer = 0;
40
subxspeed = 0;
41
subyspeed = 0;
42
subx = 0;
43
suby = 0;
44
walkanim = 0;
45
walkbuffer = 0;
46
walktimer = 0;
47
image_speed = 0;
48
dsprite = spr_krisd;
49
rsprite = spr_krisr;
50
usprite = spr_krisu;
51
lsprite = spr_krisl;
52
if (global.darkzone == 1)
53
{
54
    dsprite = spr_krisd_dark;
55
    rsprite = spr_krisr_dark;
56
    lsprite = spr_krisl_dark;
57
    usprite = spr_krisu_dark;
58
}
59
fun = 0;
60
if (global.facing == 0)
61
    sprite_index = dsprite;
62
if (global.facing == 1)
63
    sprite_index = rsprite;
64
if (global.facing == 2)
65
    sprite_index = usprite;
66
if (global.facing == 3)
67
    sprite_index = lsprite;
68
onebuffer = 0;
69
twobuffer = 0;
70
threebuffer = 0;
71
global.menuno = 0;
72
for (i = 0; i < 10; i += 1)
73
    global.menucoord[i] = 0;
74
if (global.interact == 3)
75
{
76
    if (global.entrance > 0)
77
    {
78
        global.interact = 0;
79
        if (global.entrance == 1)
80
        {
81
            x = obj_markerA.x;
82
            y = obj_markerA.y;
83
        }
84
        if (global.entrance == 2)
85
        {
86
            x = obj_markerB.x;
87
            y = obj_markerB.y;
88
        }
89
        if (global.entrance == 4)
90
        {
91
            x = obj_markerC.x;
92
            y = obj_markerC.y;
93
        }
94
        if (global.entrance == 5)
95
        {
96
            x = obj_markerD.x;
97
            y = obj_markerD.y;
98
        }
99
        if (global.entrance == 6)
100
        {
101
            x = obj_markerE.x;
102
            y = obj_markerE.y;
103
        }
104
        if (global.entrance == 7)
105
        {
106
            x = obj_markerF.x;
107
            y = obj_markerF.y;
108
        }
109
        if (global.entrance == 18)
110
        {
111
            x = obj_markerr.x;
112
            y = obj_markerr.y;
113
        }
114
        if (global.entrance == 19)
115
        {
116
            x = obj_markers.x;
117
            y = obj_markers.y;
118
        }
119
        if (global.entrance == 20)
120
        {
121
            x = obj_markert.x;
122
            y = obj_markert.y;
123
        }
124
        if (global.entrance == 21)
125
        {
126
            x = obj_markeru.x;
127
            y = obj_markeru.y;
128
        }
129
        if (global.entrance == 22)
130
        {
131
            x = obj_markerv.x;
132
            y = obj_markerv.y;
133
        }
134
        if (global.entrance == 23)
135
        {
136
            x = obj_markerw.x;
137
            y = obj_markerw.y;
138
        }
139
        if (global.entrance == 24)
140
        {
141
            x = obj_markerX.x;
142
            y = obj_markerX.y;
143
        }
144
    }
145
}
146
initwd = sprite_width;
147
initht = sprite_height;
148
mywidth = sprite_width;
149
myheight = sprite_height;
150
for (i = 0; i < 3; i += 1)
151
    global.battledf[i] = global.df[global.char[i]] + global.itemdf[global.char[i]][0] + global.itemdf[global.char[i]][1] + global.itemdf[global.char[i]][2];
152
menuOpened = false;