|
1
|
scr_populatecharsscr_populatechars
function scr_populatechars()
{
if (!variable_instance_exists(id, "kris"))
kris = 0;
if (!variable_instance_exists(id, "ralsei"))
ralsei = 0;
if (!variable_instance_exists(id, "susie"))
susie = 0;
if (!variable_instance_exists(id, "noelle"))
noelle = 0;
if (kris == 0)
{
with (obj_mainchara)
other.kris = id;
}
if (susie == 0)
{
with (obj_caterpillarchara)
{
if (name == "susie")
other.susie = id;
}
}
if (ralsei == 0)
{
with (obj_caterpillarchara)
{
if (name == "ralsei")
other.ralsei = id;
}
}
if (noelle == 0)
{
with (obj_caterpillarchara)
{
if (name == "noelle")
other.noelle = id;
}
}
} ();
|
|
2
|
if (!init)
|
|
3
|
{
|
|
4
|
if (global.flag[891] == 1)
|
|
5
|
{
|
|
6
|
with (obj_church_piano_hint)
|
|
7
|
{
|
|
8
|
alpha = 1;
|
|
9
|
active = 1;
|
|
10
|
scr_depthscr_depth
function scr_depth(arg0 = id, arg1 = 0)
{
with (arg0)
depth = 100000 - ((y * 10) + (sprite_height * 10) + (arg1 * 10));
} ();
|
|
11
|
depth -= 100;
|
|
12
|
}
|
|
13
|
}
|
|
14
|
init = 1;
|
|
15
|
}
|
|
16
|
if (scr_debugscr_debug
function scr_debug()
{
if (global.debug == 1)
return 1;
} ())
|
|
17
|
{
|
|
18
|
if (keyboard_check(ord("W")) && keyboard_check_pressed(ord("V")))
|
|
19
|
{
|
|
20
|
global.flag[891] = 0;
|
|
21
|
var loc = scr_heromarkerscr_heromarker
function scr_heromarker(arg0 = "", arg1 = "")
{
var ____foundmarker = -4;
var xpos = -1;
var ypos = -1;
var objindextocheck = 1365;
if (string_pos("kr", arg0) != 0)
objindextocheck = 544;
if (string_pos("su", arg0) != 0)
objindextocheck = 522;
if (string_pos("ra", arg0) != 0)
objindextocheck = 75;
if (string_pos("no", arg0) != 0)
objindextocheck = 933;
if (string_pos("gen", arg0) != 0)
objindextocheck = 1365;
with (objindextocheck)
{
if (variable_instance_exists(id, "extflag"))
{
if (extflag == arg1)
____foundmarker = id;
}
}
if (instance_exists(____foundmarker))
{
xpos = ____foundmarker.x;
ypos = ____foundmarker.y;
}
if (____foundmarker == -4)
{
debug_message("scr_heromarker(" + arg0 + "," + arg1 + ") Object Not Found");
return [-4, -4, -4];
}
return [xpos, ypos, ____foundmarker];
}
function scr_genmarker(arg0 = "")
{
var marker = -4;
with (obj_genmarker)
{
if (extflag == arg0)
marker = id;
}
return marker;
} ("kris", "debugwarp");
|
|
22
|
if (i_ex(loc[2]))
|
|
23
|
{
|
|
24
|
scr_populatecharsscr_populatechars
function scr_populatechars()
{
if (!variable_instance_exists(id, "kris"))
kris = 0;
if (!variable_instance_exists(id, "ralsei"))
ralsei = 0;
if (!variable_instance_exists(id, "susie"))
susie = 0;
if (!variable_instance_exists(id, "noelle"))
noelle = 0;
if (kris == 0)
{
with (obj_mainchara)
other.kris = id;
}
if (susie == 0)
{
with (obj_caterpillarchara)
{
if (name == "susie")
other.susie = id;
}
}
if (ralsei == 0)
{
with (obj_caterpillarchara)
{
if (name == "ralsei")
other.ralsei = id;
}
}
if (noelle == 0)
{
with (obj_caterpillarchara)
{
if (name == "noelle")
other.noelle = id;
}
}
} ();
|
|
25
|
setxy(loc[0], loc[1], kris);
|
|
26
|
setxy(loc[0], loc[1], susie);
|
|
27
|
setxy(loc[0], loc[1], ralsei);
|
|
28
|
scr_caterpillar_interpolatescr_caterpillar_interpolate
function scr_caterpillar_interpolate(arg0 = "none")
{
if (arg0 == "all")
{
with (obj_caterpillarchara)
scr_caterpillar_interpolate_old();
}
else if (arg0 == "none")
{
if (object_index == obj_caterpillarchara)
scr_caterpillar_interpolate_old();
}
else
{
with (obj_caterpillarchara)
{
if (name == arg0)
scr_caterpillar_interpolate_old();
}
}
}
function scr_caterinterp(arg0 = "none")
{
scr_caterpillar_interpolate(arg0);
}
function scr_caterpillar_interpolate_old()
{
_newfacing = scr_facing_letter_to_number(scr_get_cardinal_direction(point_direction(x, y, obj_mainchara.x, obj_mainchara.y)));
remx[0] = obj_mainchara.x;
remy[0] = obj_mainchara.y;
facing[0] = _newfacing;
for (_iaia = target; _iaia > 0; _iaia -= 1)
{
remx[_iaia] = lerp(obj_mainchara.x, x, _iaia / target);
if (global.darkzone == 1)
remy[_iaia] = lerp(obj_mainchara.y, y + 16, _iaia / target);
else
remy[_iaia] = lerp(obj_mainchara.y, y + 6, _iaia / target);
facing[_iaia] = _newfacing;
}
} ("all");
|
|
29
|
}
|
|
30
|
}
|
|
31
|
}
|
|
32
|
if (cutscene == 0)
|
|
33
|
{
|
|
34
|
with (obj_floorswitch)
|
|
35
|
{
|
|
36
|
if (extflag == "1315" && pressed)
|
|
37
|
{
|
|
38
|
other.cutscene = 1;
|
|
39
|
other.timer = 0;
|
|
40
|
global.interact = 1;
|
|
41
|
}
|
|
42
|
}
|
|
43
|
}
|
|
44
|
if (cutscene == 1)
|
|
45
|
{
|
|
46
|
timer++;
|
|
47
|
if (timer >= 15)
|
|
48
|
{
|
|
49
|
global.flag[850] = 1;
|
|
50
|
obj_ch4_DCA08A.con = 1;
|
|
51
|
cutscene = 3;
|
|
52
|
timer = 0;
|
|
53
|
}
|
|
54
|
}
|
|
55
|
if (trcon == 0)
|
|
56
|
{
|
|
57
|
var trig = 0;
|
|
58
|
with (obj_treasure_room)
|
|
59
|
{
|
|
60
|
if (myinteract == 3)
|
|
61
|
trig = 1;
|
|
62
|
}
|
|
63
|
if (trig == 1)
|
|
64
|
{
|
|
65
|
scr_shakescreenscr_shakescreen
function scr_shakescreen(arg0 = 4, arg1 = 4)
{
var shaker = instance_create(x, y, obj_shake);
if (i_ex(shaker))
{
shaker.shakex = arg0;
shaker.shakey = arg1;
}
} ();
|
|
66
|
safe_delete(solidblock);
|
|
67
|
layer_set_visible("Tiles_addedwalkway", 1);
|
|
68
|
layer_set_visible("tiles_hiddenpole", 1);
|
|
69
|
with (instance_create(hiddenlightx, hiddenlighty, obj_lantern_shrinking))
|
|
70
|
{
|
|
71
|
r_littlesize = 64;
|
|
72
|
r_bigsize = 240;
|
|
73
|
r_maxtimer = 80;
|
|
74
|
r_timebuffer = 0;
|
|
75
|
extflag = "light";
|
|
76
|
nointeract = true;
|
|
77
|
}
|
|
78
|
with (instance_create(hiddentilex, hiddentiley, obj_dw_church_glowtile))
|
|
79
|
extflag = "light";
|
|
80
|
trcon = 999;
|
|
81
|
}
|
|
82
|
}
|
|
83
|
if (warpcon == 0)
|
|
84
|
{
|
|
85
|
var trig = 0;
|
|
86
|
with (obj_floorswitch)
|
|
87
|
{
|
|
88
|
if (extflag == "end")
|
|
89
|
{
|
|
90
|
if (place_meeting(x, y, obj_mainchara))
|
|
91
|
trig = 1;
|
|
92
|
}
|
|
93
|
}
|
|
94
|
if (trig == 1)
|
|
95
|
{
|
|
96
|
global.interact = 1;
|
|
97
|
global.tempflag[50] = kris.x;
|
|
98
|
global.tempflag[51] = kris.y;
|
|
99
|
global.tempflag[52] = susie.x;
|
|
100
|
global.tempflag[53] = susie.y;
|
|
101
|
global.tempflag[54] = ralsei.x;
|
|
102
|
global.tempflag[55] = ralsei.y;
|
|
103
|
global.tempflag[56] = 1;
|
|
104
|
debug_message("krxy=" + string(global.tempflag[50]) + "|" + string(global.tempflag[51]));
|
|
105
|
for (var i = 0; i < 8; i++)
|
|
106
|
debug_message("global.tempflag[" + string(50 + i) + "]=" + string(global.tempflag[50 + i]));
|
|
107
|
room_goto(room_dw_church_pianopiece_left_b);
|
|
108
|
}
|
|
109
|
}
|
|
110
|
if (global.interact == 0)
|
|
111
|
{
|
|
112
|
with (obj_trigger)
|
|
113
|
{
|
|
114
|
if (extflag == "nomenu")
|
|
115
|
{
|
|
116
|
if (place_meeting(x, y, obj_mainchara))
|
|
117
|
{
|
|
118
|
with (obj_darkcontroller)
|
|
119
|
charcon = 0;
|
|
120
|
}
|
|
121
|
}
|
|
122
|
}
|
|
123
|
}
|