|
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
|
var silent = 0;
|
|
3
|
if (i_ex(obj_dw_churchb_ripple1))
|
|
4
|
silent = 1;
|
|
5
|
var ripplealphaoffset = 0;
|
|
6
|
with (obj_dw_churchb_gersonchase)
|
|
7
|
ripplealphaoffset = darkindex;
|
|
8
|
if (init == 0)
|
|
9
|
{
|
|
10
|
with (obj_church_ripple_area)
|
|
11
|
visible = false;
|
|
12
|
member[0] = kris;
|
|
13
|
member[1] = susie;
|
|
14
|
member[2] = ralsei;
|
|
15
|
init = 1;
|
|
16
|
}
|
|
17
|
if (active)
|
|
18
|
{
|
|
19
|
for (var i = 0; i < 1; i++)
|
|
20
|
{
|
|
21
|
if (i_ex(member[i]))
|
|
22
|
{
|
|
23
|
var ripple;
|
|
24
|
with (member[i])
|
|
25
|
ripple = instance_place(x, y, obj_church_ripple_area);
|
|
26
|
if (i_ex(ripple) || other.alwaysrip)
|
|
27
|
{
|
|
28
|
var ripkind = 0;
|
|
29
|
with (member[i])
|
|
30
|
{
|
|
31
|
with (instance_place(x, y, obj_slowwalk))
|
|
32
|
{
|
|
33
|
ripkind = 1;
|
|
34
|
if (maxwalkspeed <= 3)
|
|
35
|
ripkind = 2;
|
|
36
|
}
|
|
37
|
}
|
|
38
|
if ((member[i].image_index == 1 || other.makefirstrip == true) && stepped[i] == false)
|
|
39
|
{
|
|
40
|
other.makefirstrip = false;
|
|
41
|
var vx = 0;
|
|
42
|
var vy = 0;
|
|
43
|
stepped[i] = true;
|
|
44
|
var snd = 348;
|
|
45
|
if (ripkind == 1)
|
|
46
|
snd = 118;
|
|
47
|
if (ripkind == 2)
|
|
48
|
snd = 118;
|
|
49
|
var pitchmod = 1;
|
|
50
|
if (ripkind == 1)
|
|
51
|
pitchmod = 0.8;
|
|
52
|
if (ripkind == 2)
|
|
53
|
pitchmod = 0.6;
|
|
54
|
if (!silent)
|
|
55
|
{
|
|
56
|
if (i == 0)
|
|
57
|
snd_play_x(snd, 1, 0.8 * pitchmod);
|
|
58
|
if (i == 1)
|
|
59
|
snd_play_x(snd, 0.2, 0.8 * pitchmod);
|
|
60
|
if (i == 2)
|
|
61
|
snd_play_x(snd, 0.2, 1.1 * pitchmod);
|
|
62
|
}
|
|
63
|
for (var j = 0; j < 2; j++)
|
|
64
|
{
|
|
65
|
if (j == 0)
|
|
66
|
{
|
|
67
|
if (i_ex(obj_dw_church_waterfallroom))
|
|
68
|
{
|
|
69
|
with (obj_dw_church_waterfallroom.bellint)
|
|
70
|
{
|
|
71
|
var maxdist = 480;
|
|
72
|
var dist = distance_to_point(other.member[0].x, other.member[0].y);
|
|
73
|
if (dist < maxdist)
|
|
74
|
scr_fancy_ripplescr_fancy_ripple
function scr_fancy_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0)
{
if (!instance_exists(obj_fancy_ripples))
instance_create_depth(0, 0, arg7, obj_fancy_ripples);
with (obj_fancy_ripples)
{
depth = arg7;
MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11);
}
}
function scr_fancy_ripple_alt(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0)
{
if (!instance_exists(obj_fancy_ripples_alt))
instance_create_depth(0, 0, arg7, obj_fancy_ripples_alt);
with (obj_fancy_ripples_alt)
{
depth = arg7;
MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11);
}
} (x + (sprite_width / 2), y + (sprite_height / 2), 60, 65535, 120, 1, 15, 1999000);
|
|
75
|
}
|
|
76
|
}
|
|
77
|
}
|
|
78
|
var _sizeMod = 1;
|
|
79
|
if (instance_exists(obj_dw_churchc_treasurechest))
|
|
80
|
ripkind = 3;
|
|
81
|
if (ripkind == 1)
|
|
82
|
_sizeMod = 0.5;
|
|
83
|
if (ripkind == 2)
|
|
84
|
_sizeMod = 0.4;
|
|
85
|
if (ripkind == 3)
|
|
86
|
_sizeMod = 0.7;
|
|
87
|
scr_fancy_ripplescr_fancy_ripple
function scr_fancy_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0)
{
if (!instance_exists(obj_fancy_ripples))
instance_create_depth(0, 0, arg7, obj_fancy_ripples);
with (obj_fancy_ripples)
{
depth = arg7;
MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11);
}
}
function scr_fancy_ripple_alt(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0)
{
if (!instance_exists(obj_fancy_ripples_alt))
instance_create_depth(0, 0, arg7, obj_fancy_ripples_alt);
with (obj_fancy_ripples_alt)
{
depth = arg7;
MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11);
}
} (member[i].x + 18 + vx, member[i].y + 72 + vy, 60, 16159050, 220 * _sizeMod, 1, 18 * _sizeMod, 1999000, member[i].px * 1.05, member[i].py * 1.05);
|
|
88
|
scr_fancy_ripplescr_fancy_ripple
function scr_fancy_ripple(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0)
{
if (!instance_exists(obj_fancy_ripples))
instance_create_depth(0, 0, arg7, obj_fancy_ripples);
with (obj_fancy_ripples)
{
depth = arg7;
MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11);
}
}
function scr_fancy_ripple_alt(arg0, arg1, arg2 = 60, arg3 = 16159050, arg4 = 160, arg5 = 1, arg6 = 15, arg7 = 1999000, arg8 = 0, arg9 = 0, arg10 = 0.1, arg11 = 0)
{
if (!instance_exists(obj_fancy_ripples_alt))
instance_create_depth(0, 0, arg7, obj_fancy_ripples_alt);
with (obj_fancy_ripples_alt)
{
depth = arg7;
MakeRipple(arg0, arg1, arg4, arg5, arg6, arg3, arg8, arg9, arg10, arg2, arg11);
}
} (member[i].x + 18 + vx, member[i].y + 72 + vy, 60, 16159050, 140 * _sizeMod, 1, 15 * _sizeMod, 1999000, member[i].px * 1.05, member[i].py * 1.05);
|
|
89
|
}
|
|
90
|
}
|
|
91
|
if (member[i].image_index == 0 || member[i].image_index == 2 || member[i].image_index == 3)
|
|
92
|
stepped[i] = false;
|
|
93
|
}
|
|
94
|
}
|
|
95
|
}
|
|
96
|
}
|
|
97
|
if (lightcon == -1)
|
|
98
|
{
|
|
99
|
active = false;
|
|
100
|
var start_x_pos = 0;
|
|
101
|
if (i_ex(obj_ch4_DCA04))
|
|
102
|
start_x_pos = 8440;
|
|
103
|
var dostart = 0;
|
|
104
|
if (kris.x >= start_x_pos)
|
|
105
|
dostart = true;
|
|
106
|
with (obj_ch4_DCA04)
|
|
107
|
{
|
|
108
|
if (con > 1)
|
|
109
|
dostart = true;
|
|
110
|
}
|
|
111
|
if (dostart)
|
|
112
|
{
|
|
113
|
if (instance_exists(obj_ch4_DCA04))
|
|
114
|
{
|
|
115
|
}
|
|
116
|
active = true;
|
|
117
|
if (layer_exists("WALLTILES"))
|
|
118
|
layer_set_visible("WALLTILES", 1);
|
|
119
|
if (layer_exists("FLOORTILES"))
|
|
120
|
layer_set_visible("FLOORTILES", 0);
|
|
121
|
with (obj_mainchara)
|
|
122
|
image_blend = c_black;
|
|
123
|
with (obj_treasure_room)
|
|
124
|
image_blend = c_black;
|
|
125
|
with (obj_caterpillarchara)
|
|
126
|
image_blend = c_black;
|
|
127
|
lightcon = 0;
|
|
128
|
}
|
|
129
|
}
|
|
130
|
if (lightcon == 0)
|
|
131
|
{
|
|
132
|
var end_pos = new Vector2(room_width, room_height);
|
|
133
|
if (i_ex(obj_ch4_DCA04))
|
|
134
|
end_pos = new Vector2(2582, 0);
|
|
135
|
if (i_ex(kris))
|
|
136
|
{
|
|
137
|
if ((kris.x >= end_pos.x && kris.y >= end_pos.y) || (scr_debugscr_debug
function scr_debug()
{
if (global.debug == 1)
return 1;
} () && keyboard_check_pressed(ord("M"))))
|
|
138
|
lightcon = 1;
|
|
139
|
}
|
|
140
|
}
|
|
141
|
if (lightcon == 1)
|
|
142
|
{
|
|
143
|
lightcon = 2;
|
|
144
|
with (obj_mainchara)
|
|
145
|
image_blend = c_white;
|
|
146
|
with (obj_caterpillarchara)
|
|
147
|
image_blend = c_white;
|
|
148
|
safe_delete(obj_church_ripple);
|
|
149
|
safe_delete(obj_fancy_ripples);
|
|
150
|
safe_delete(obj_fancy_ripples_alt);
|
|
151
|
with (obj_treasure_room)
|
|
152
|
{
|
|
153
|
image_blend = c_white;
|
|
154
|
if (image_index != 1)
|
|
155
|
instance_destroy();
|
|
156
|
}
|
|
157
|
layer_set_visible("WALLTILES", 0);
|
|
158
|
layer_set_visible("FLOORTILES", 1);
|
|
159
|
active = false;
|
|
160
|
}
|