depth = 6000; con = 0; timer = 0; init = 0; siner = 0; roomphase = 0; ccon = 0; catchinteract = false; forceclimb = false; turnofflayers("cutscene"); turnofflayers("DEBUG"); turnofflayers("ASSETS"); turnofflayers("NPCs"); layer_set_visible("BG_ASSETS", 1); scoreboard = { x: 0, y: room_height, siner: 0, timer: 0, image_index: 0, timetogonow: false }; curtain = scr_marker_fromasset(findsprite(spr_dw_changing_room_curtain, "ASSETS")); curtain.sprite_index = spr_dw_castle_church_climb_curtain; curtain.image_index = 0; curtain.image_speed = 0; scr_depth(curtain, 1000); curtainbg = scr_marker_fromasset(findsprite(spr_dw_changing_room_curtain_back, "ASSETS")); curtainbg.sprite_index = spr_dw_castle_church_climb_curtainbg; var bgTopDecor = findsprite_all(6202, "ASSETS"); for (var i = 0; i < array_length(bgTopDecor); i++) scr_marker_fromasset(bgTopDecor[i], curtain.depth - 1); scr_depth(curtainbg, -10000); var music = "climb.ogg"; scr_musicer(music); thisclimbtime = -1; cutscene = -1; fademusic = 0; canceltimer = 0; effectinit = 0; climbflag = 1440; timber = 0; climbingcon = 0; stufftomove = []; array_push(stufftomove, 586); array_push(stufftomove, 1064); array_push(stufftomove, 1712); var ws1 = findspriteinfo(spr_dw_church_climb_wallswitch, "ASSETS"); wallswitch = scr_marker_ext(ws1.x, ws1.y, spr_dw_church_climb_wallswitch, 2, 2, 0, undefined, undefined, 99990); triginit = 0; climbinit = 0; forcefall = 0; tickcount = 0; fulltime = 54000; ch4trophy = -4; if (global.flag[1524] <= 182 && global.flag[1524] != 0 && global.flag[1525] <= 302 && global.flag[1525] != 0) { ch4trophy = scr_makenpc_fromasset(findsprite(spr_dw_church_sideclimb_trophy, "ASSETS", #A1FF82)); ch4trophy.marker.image_blend = c_white; } ch5trophy = -4; maketrophy = function() { if (!i_ex(ch5trophy)) { ch5trophy = scr_makenpc_fromasset(findsprite(spr_dw_church_sideclimb_trophy, "ASSETS", #CEFF3D)); ch5trophy.marker.image_blend = c_white; } }; devtime = 512; if (global.flag[climbflag] <= devtime && global.flag[climbflag] > 1) maketrophy(); if (i_ex(ch4trophy) || i_ex(ch5trophy)) { var tab = findsprite(spr_dw_castle_church_climb_table, "ASSETS"); table = scr_marker_fromasset(tab); with (table) { with (instance_create(bbox_left, bbox_top, obj_solidblocksized)) scr_sizeexact(other.bbox_right - other.bbox_left, other.bbox_bottom - other.bbox_top); scr_depth_alt(); } with (ch4trophy) marker.depth = other.table.depth - 1; with (ch5trophy) marker.depth = other.table.depth - 1; } cup = scr_makenpc_fromasset(findsprite(spr_npc_cup_walk, "NPCs")); cup.issolid = false; var werewirerecruited = false; if (global.flag[633] == 1) werewirerecruited = true; balt = -4; baltswing = -4; werewire = -4; if (!werewirerecruited) { balt = scr_makenpc_fromasset(findsprite(spr_incense_spared, "NPCs")); balt.issolid = false; var bl = findspriteinfo(spr_pxwhite, "npcs", #FF23CF, undefined); baltsolid = instance_create(bl.x, bl.y, obj_solidblocksized); with (baltsolid) scr_sizeexact(bl.sprite_width, bl.sprite_height); } else { baltswing = scr_makenpc_fromasset(findsprite(spr_dw_npc_balthizard_swing, "NPCs"), true); with (baltswing) { markerstick = false; issolid = false; with (marker) { shadow = scr_marker_ext(x, y + 108, spr_seth_shadow, 4, 2, undefined, undefined, c_black, 1000000, undefined, undefined, 0.25); scr_sizeexact(80, 18, shadow); siner = 0; step_func = function() { siner++; var targalpha = !instance_exists(obj_climb_kris); image_alpha = lerp(image_alpha, targalpha, 0.25); x = lerp(x, xstart + (sin(siner / 15) * 12), 0.25); y = lerp(y, ystart + (abs(cos(siner / 15)) * 4), 0.25); }; end_step_func = function() { shadow.image_alpha = ((((y - ystart) / 4) * 0.025) + 0.25) * image_alpha; shadow.x = x + 44; }; draw_func = function() { draw_self(); for (var i = 0; i < 32; i++) { var xloc = lerp(x, xstart, i / 12) + 28 + 16; var yloc = (y - (34 * i)) + 4 + 2; draw_sprite_ext(spr_dw_npc_balthizard_swing_tether, 0, xloc, yloc, 2, 2, 0, c_white, image_alpha); } }; } } werewire = scr_makenpc_fromasset(findsprite(spr_werewire_hang, "NPCs"), true); with (werewire) { markerstick = false; issolid = false; with (marker) { shadow = scr_marker_ext(x, y + 166, spr_seth_shadow, 4, 2, undefined, undefined, c_black, 1000000, undefined, undefined, 0.25); scr_sizeexact(48, 18, shadow); siner = 0; step_func = function() { siner++; var targalpha = !instance_exists(obj_climb_kris); image_alpha = lerp(image_alpha, targalpha, 0.25); x = lerp(x, xstart + (sin(-siner / 15) * 12), 0.25); y = lerp(y, ystart + (abs(cos(-siner / 15)) * 4), 0.25); }; end_step_func = function() { shadow.image_alpha = ((((y - ystart) / 4) * 0.025) + 0.25) * image_alpha; shadow.x = (x + 44) - 24; }; draw_func = function() { draw_self(); for (var i = 0; i < 5; i++) { var xloc = (lerp(x, xstart, i / 12) + 28 + 16) - 40; var yloc = y - (24 * i); draw_sprite_ext(spr_werewire_hang_tether, 0, xloc, yloc, 2, 24, 0, c_white, image_alpha); } }; } } } if (!instance_exists(obj_tutorial_text)) instance_create(0, 0, obj_tutorial_text); cutbit = 1441; bitdepth = 1; bitvals = 12; sawCutscene0 = scr_flag_get_ext(cutbit, 0, bitdepth); sawCutscene1 = scr_flag_get_ext(cutbit, 1, bitdepth); sawCutscene5 = scr_flag_get_ext(cutbit, 2, bitdepth); ralseiScene5Choice = scr_flag_get_ext(cutbit, 3, bitdepth); sawCutscene2 = scr_flag_get_ext(cutbit, 4, bitdepth); sawCutscene3 = scr_flag_get_ext(cutbit, 5, bitdepth); sawCutscene4 = scr_flag_get_ext(cutbit, 6, bitdepth); sawCutscene9 = scr_flag_get_ext(cutbit, 7, bitdepth); sawCutscene6 = scr_flag_get_ext(cutbit, 8, bitdepth); show_debug_message_concat("\nsawCutscene0", " = ", sawCutscene0, "\nsawCutscene1", " = ", sawCutscene1, "\nsawCutscene5", " = ", sawCutscene5, "\nralseiScene5Choice", " = ", ralseiScene5Choice, "\nsawCutscene2", " = ", sawCutscene2, "\nsawCutscene3", " = ", sawCutscene3, "\nsawCutscene4", " = ", sawCutscene4, "\nsawCutscene9", " = ", sawCutscene9, "\nsawCutscene6", " = ", sawCutscene6); updateSeenCutscenes = function() { var savearray = [sawCutscene0, sawCutscene1, sawCutscene5, ralseiScene5Choice, sawCutscene2, sawCutscene3, sawCutscene4, sawCutscene9, sawCutscene6]; for (var i = 0; i < array_length(savearray); i++) scr_flag_set_ext(cutbit, i, savearray[i], bitdepth); }; seenAll = function() { var seen = false; if (sawCutscene1 && sawCutscene3 && sawCutscene4 && sawCutscene5) seen = true; return seen; };