|
1
|
layer_set_visible("BGCOLOR_DEBUG", 0);
|
|
2
|
layer_set_visible("TILES_BG", 0);
|
|
3
|
layer_set_visible("DEBUG_ASSETS", 0);
|
|
4
|
init = 0;
|
|
5
|
riptime = 0;
|
|
6
|
riparea = instance_create(0, 0, obj_church_ripple_area);
|
|
7
|
scr_sizeexactscr_sizeexact
function scr_sizeexact(arg0, arg1, arg2 = id)
{
with (arg2)
{
if (!sprite_exists(sprite_index))
{
debug_message("Can't size, no sprite");
exit;
}
var _w = sprite_get_width(sprite_index);
var _h = sprite_get_width(sprite_index);
image_xscale = arg0 / _w;
image_yscale = arg1 / _h;
}
} (room_width, room_height, riparea);
|
|
8
|
ripplemanager = instance_create(0, 0, obj_church_ripple_area_manager);
|
|
9
|
ripplemanager.active = true;
|
|
10
|
if (!up_h() && !down_h() && !right_h() && !left_h())
|
|
11
|
{
|
|
12
|
with (obj_mainchara)
|
|
13
|
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 + 18, y + 72, 60, 16159050, 240, 1, 18);
|
|
14
|
}
|
|
15
|
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;
}
}
} ();
|
|
16
|
layerarray = layer_get_all();
|
|
17
|
shelvesinit = 0;
|
|
18
|
sprite_array_size = -1;
|
|
19
|
organik = [];
|
|
20
|
for (var i = 0; i < array_length(layerarray); i++)
|
|
21
|
{
|
|
22
|
if (layer_get_name(layerarray[i]) == "DEBUG_ASSETS")
|
|
23
|
{
|
|
24
|
elements = layer_get_all_elements(layerarray[i]);
|
|
25
|
for (var j = 0; j < array_length(elements); j++)
|
|
26
|
{
|
|
27
|
if (layer_get_element_type(elements[j]) == 4)
|
|
28
|
{
|
|
29
|
if (layer_sprite_get_sprite(elements[j]) == 5689)
|
|
30
|
{
|
|
31
|
sprite_array_size++;
|
|
32
|
organik[sprite_array_size] = instance_create(layer_sprite_get_x(elements[j]), layer_sprite_get_y(elements[j]), obj_trigger_interact);
|
|
33
|
organik[sprite_array_size].sprite_index = spr_dw_church_worshipstatue;
|
|
34
|
organik[sprite_array_size].image_speed = 0;
|
|
35
|
organik[sprite_array_size].image_index = layer_sprite_get_index(elements[j]);
|
|
36
|
organik[sprite_array_size].image_xscale = layer_sprite_get_xscale(elements[j]);
|
|
37
|
organik[sprite_array_size].image_yscale = 2;
|
|
38
|
organik[sprite_array_size].image_blend = c_black;
|
|
39
|
organik[sprite_array_size].visible = true;
|
|
40
|
scr_depth_altscr_depth_alt
function scr_depth_alt(arg0 = id, arg1 = 0)
{
with (arg0)
depth = 100000 - ((y * 10) + ((sprite_height - sprite_yoffset) * 10) + (arg1 * 10));
} (organik[sprite_array_size]);
|
|
41
|
layer_sprite_destroy(elements[j]);
|
|
42
|
}
|
|
43
|
}
|
|
44
|
}
|
|
45
|
break;
|
|
46
|
}
|
|
47
|
}
|
|
48
|
wafer = scr_makenpcscr_makenpc
function scr_makenpc(arg0 = "", arg1 = "", arg2 = false)
{
var _mylayer = layer_get_id(arg0);
if (_mylayer == -1)
{
debug_print("Warning: Check Output Console");
debug_message("scr_makenpc(" + arg0 + "," + arg1 + ") Result: Layer Not Found");
return -4;
}
var sourcenpc = layer_sprite_get_id(_mylayer, arg1);
if (sourcenpc == -1)
{
var _result = "scr_makenpc(\"" + arg0 + "\",\"" + arg1 + "\") Result: Sprite Not Found";
debug_message(_result);
debug_print("Warning: Check Output Console");
return -4;
}
var _mysprite = layer_sprite_get_sprite(sourcenpc);
var _myx = layer_sprite_get_x(sourcenpc);
var _myy = layer_sprite_get_y(sourcenpc);
var _myxscale = layer_sprite_get_xscale(sourcenpc);
var _myyscale = layer_sprite_get_yscale(sourcenpc);
var _myalpha = layer_sprite_get_alpha(sourcenpc);
var _myangle = layer_sprite_get_angle(sourcenpc);
var _myblend = layer_sprite_get_blend(sourcenpc);
var _myspeed = layer_sprite_get_speed(sourcenpc);
var _myindex = layer_sprite_get_index(sourcenpc);
var _npc = instance_create_depth(0, 0, 0, obj_trigger_interact);
_npc.marker = scr_marker_ext(_myx, _myy, _mysprite, _myxscale, _myyscale, 0, _myindex, _myblend, undefined, undefined, undefined, _myalpha);
var truex = _npc.marker.bbox_left;
var truey = _npc.marker.bbox_top;
var truexscale = _npc.marker.bbox_right - _npc.marker.bbox_left;
var trueyscale = _npc.marker.bbox_bottom - _npc.marker.bbox_top;
setxy(truex, truey, _npc);
_npc.markerxoffset = truex - _npc.marker.x;
_npc.markeryoffset = truey - _npc.marker.y;
_npc.markerstick = true;
scr_sizeexact(truexscale, trueyscale, _npc);
if (arg2)
{
_npc.visible = true;
_npc.image_alpha = 1;
}
_npc.strict = true;
_npc.issolid = true;
_npc.talked = 0;
scr_depth_alt(_npc.marker);
return _npc;
}
function scr_makenpc_fromasset(arg0, arg1 = false)
{
var sourcenpc = arg0;
var _mysprite = layer_sprite_get_sprite(sourcenpc);
var _myx = layer_sprite_get_x(sourcenpc);
var _myy = layer_sprite_get_y(sourcenpc);
var _myxscale = layer_sprite_get_xscale(sourcenpc);
var _myyscale = layer_sprite_get_yscale(sourcenpc);
var _myalpha = layer_sprite_get_alpha(sourcenpc);
var _myangle = layer_sprite_get_angle(sourcenpc);
var _myblend = layer_sprite_get_blend(sourcenpc);
var _myspeed = layer_sprite_get_speed(sourcenpc);
var _myindex = layer_sprite_get_index(sourcenpc);
var _npc = instance_create_depth(0, 0, 0, obj_trigger_interact);
_npc.marker = scr_marker_ext(_myx, _myy, _mysprite, _myxscale, _myyscale, 0, _myindex, _myblend, undefined, undefined, undefined, _myalpha);
var truex = _npc.marker.bbox_left;
var truey = _npc.marker.bbox_top;
var truexscale = _npc.marker.bbox_right - _npc.marker.bbox_left;
var trueyscale = _npc.marker.bbox_bottom - _npc.marker.bbox_top;
setxy(truex, truey, _npc);
_npc.markerxoffset = truex - _npc.marker.x;
_npc.markeryoffset = truey - _npc.marker.y;
_npc.markerstick = true;
scr_sizeexact(truexscale, trueyscale, _npc);
if (arg1)
{
_npc.visible = true;
_npc.image_alpha = 1;
}
_npc.strict = true;
_npc.issolid = true;
_npc.talked = 0;
scr_depth_alt(_npc.marker);
return _npc;
} ("DEBUG_ASSETS", "dspr_wafer");
|
|
49
|
with (wafer.marker)
|
|
50
|
{
|
|
51
|
image_speed = 0;
|
|
52
|
image_blend = c_black;
|
|
53
|
}
|
|
54
|
var endareamarker = 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;
} ("", "fakeblock");
|
|
55
|
endarea = instance_create(endareamarker[0], endareamarker[1], obj_solidblocksized);
|
|
56
|
with (endarea)
|
|
57
|
{
|
|
58
|
sprite_index = spr_pxwhite;
|
|
59
|
scr_sizeexactscr_sizeexact
function scr_sizeexact(arg0, arg1, arg2 = id)
{
with (arg2)
{
if (!sprite_exists(sprite_index))
{
debug_message("Can't size, no sprite");
exit;
}
var _w = sprite_get_width(sprite_index);
var _h = sprite_get_width(sprite_index);
image_xscale = arg0 / _w;
image_yscale = arg1 / _h;
}
} (endareamarker[2].image_xscale, endareamarker[2].image_yscale);
|
|
60
|
image_blend = c_black;
|
|
61
|
depth = 1000000;
|
|
62
|
visible = true;
|
|
63
|
}
|
|
64
|
con = 0;
|
|
65
|
if (global.flag[1502] >= 1)
|
|
66
|
safe_delete(endarea);
|
|
67
|
roomstart = false;
|
|
68
|
if (global.flag[1502] >= 2)
|
|
69
|
{
|
|
70
|
roomstart = true;
|
|
71
|
alarm[0] = 1; gml_Object_obj_dw_church_rippleworship_Alarm_0.gml
event_user(0);
|
|
72
|
}
|
|
73
|
scr_musicerscr_musicer
function scr_musicer(arg0 = "dogcheck.ogg", arg1 = 0.7, arg2 = 1, arg3 = 0, arg4 = -1)
{
var musicer = instance_create_depth(0, 0, 0, obj_musicer_gen);
musicer.song = arg0;
musicer.volume = arg1;
musicer.pitch = arg2;
musicer.delay = arg3;
musicer.fadein = arg4;
return musicer;
} ("darkchurch_intro.ogg", 0.7, 0.7, undefined, 30);
|