|
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 (scr_debugscr_debug
function scr_debug()
{
if (global.debug == 1)
return 1;
} ())
|
|
3
|
{
|
|
4
|
if (keyboard_check(ord("W")))
|
|
5
|
{
|
|
6
|
var moveem = false;
|
|
7
|
var pos;
|
|
8
|
if (keyboard_check_pressed(ord("1")))
|
|
9
|
{
|
|
10
|
pos = 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", "treasure");
|
|
11
|
moveem = true;
|
|
12
|
}
|
|
13
|
if (keyboard_check_pressed(ord("2")))
|
|
14
|
{
|
|
15
|
pos = 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", "side");
|
|
16
|
moveem = true;
|
|
17
|
}
|
|
18
|
if (keyboard_check_pressed(ord("3")))
|
|
19
|
{
|
|
20
|
pos = 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", "top");
|
|
21
|
moveem = true;
|
|
22
|
}
|
|
23
|
if (keyboard_check_pressed(ord("3")))
|
|
24
|
{
|
|
25
|
pos = 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", "a");
|
|
26
|
moveem = true;
|
|
27
|
}
|
|
28
|
if (moveem)
|
|
29
|
{
|
|
30
|
setxy(pos[0], pos[1], kris);
|
|
31
|
setxy(pos[0], pos[1], ralsei);
|
|
32
|
setxy(pos[0], pos[1], susie);
|
|
33
|
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");
|
|
34
|
}
|
|
35
|
}
|
|
36
|
}
|
|
37
|
if (bcon == 0)
|
|
38
|
{
|
|
39
|
var trig = 0;
|
|
40
|
with (obj_bell_small_playable)
|
|
41
|
{
|
|
42
|
if (extflag == "shortcutbell")
|
|
43
|
{
|
|
44
|
if (rung == 1)
|
|
45
|
trig = 1;
|
|
46
|
}
|
|
47
|
}
|
|
48
|
if (trig)
|
|
49
|
{
|
|
50
|
with (obj_dw_church_trueclimbadventure_appeartiles)
|
|
51
|
con = 1;
|
|
52
|
instance_create(840, 1800, obj_climb_climbable);
|
|
53
|
with (instance_create(880, 1480, obj_climb_climbable))
|
|
54
|
scr_sizescr_size
function scr_size(arg0 = image_xscale, arg1 = image_yscale, arg2 = id)
{
with (arg2)
{
image_xscale = arg0;
image_yscale = arg1;
}
} (1, 9);
|
|
55
|
layer_set_visible("CLIMBSHORTCUT1", 1);
|
|
56
|
global.flag[1530] = 1;
|
|
57
|
bcon = 1;
|
|
58
|
}
|
|
59
|
}
|
|
60
|
if (makeb2blocker == true)
|
|
61
|
{
|
|
62
|
makeb2blocker = false;
|
|
63
|
var pos = 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;
} (undefined, "b2blocker");
|
|
64
|
b2blocker = instance_create(pos[0], pos[1], obj_solidblocksized);
|
|
65
|
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;
}
} (pos[2].sprite_width, pos[2].sprite_height, b2blocker);
|
|
66
|
}
|
|
67
|
if (bcon2 == 0)
|
|
68
|
{
|
|
69
|
var trig = 0;
|
|
70
|
with (obj_bell_small_playable)
|
|
71
|
{
|
|
72
|
if (extflag == "treasurebell")
|
|
73
|
{
|
|
74
|
if (rung == 1)
|
|
75
|
trig = 1;
|
|
76
|
}
|
|
77
|
}
|
|
78
|
if (trig)
|
|
79
|
{
|
|
80
|
global.flag[1571] = 1;
|
|
81
|
var pos = 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;
} (undefined, "b2blocker");
|
|
82
|
with (scr_marker_extscr_marker_ext
function scr_marker_ext(arg0, arg1, arg2, arg3 = 1, arg4 = 1, arg5 = 0, arg6 = 0, arg7 = 16777215, arg8 = depth, arg9 = false, arg10 = -1, arg11 = 1)
{
var thismarker = instance_create(arg0, arg1, obj_marker);
with (thismarker)
{
depth = arg8;
sprite_index = arg2;
image_speed = arg5;
image_xscale = arg3;
image_yscale = arg4;
image_index = arg6;
image_blend = arg7;
image_alpha = arg11;
if (arg9)
scr_depth_alt();
}
if (arg10 > 0)
scr_doom(thismarker, arg10);
return thismarker;
}
function scr_marker_fromasset(arg0, arg1 = depth, arg2 = false)
{
if (is_undefined(arg0))
{
debug_message("Warning: scr_marker_fromasset() sprite_instance didn't exist");
return -4;
}
var sprite = layer_sprite_get_sprite(arg0);
var index = layer_sprite_get_index(arg0);
var imagespeed = layer_sprite_get_speed(arg0);
var xscale = layer_sprite_get_xscale(arg0);
var yscale = layer_sprite_get_yscale(arg0);
var angle = layer_sprite_get_angle(arg0);
var blend = layer_sprite_get_blend(arg0);
var alpha = layer_sprite_get_alpha(arg0);
var xloc = layer_sprite_get_x(arg0);
var yloc = layer_sprite_get_y(arg0);
var thismarker = instance_create_depth(xloc, yloc, arg1, obj_marker);
with (thismarker)
{
sprite_index = sprite;
image_index = index;
image_speed = imagespeed;
image_xscale = xscale;
image_yscale = yscale;
image_angle = angle;
image_blend = blend;
image_alpha = alpha;
if (arg2)
scr_depth_alt(id, arg2);
}
return thismarker;
}
function scr_assetgetinfo(arg0)
{
var sprite = layer_sprite_get_sprite(arg0);
var index = layer_sprite_get_index(arg0);
var xloc = layer_sprite_get_x(arg0);
var yloc = layer_sprite_get_y(arg0);
var xscale = layer_sprite_get_xscale(arg0);
var yscale = layer_sprite_get_yscale(arg0);
var angle = layer_sprite_get_angle(arg0);
var blend = layer_sprite_get_blend(arg0);
var alpha = layer_sprite_get_alpha(arg0);
var imagespeed = layer_sprite_get_speed(arg0);
return [sprite, index, xloc, yloc, xscale, yscale, angle, blend, alpha, imagespeed];
} (pos[0], pos[1], spr_pxwhite, pos[2].sprite_width, pos[2].sprite_height, 0, 0, #7F97F0, 5000))
|
|
83
|
{
|
|
84
|
scr_lerpvarscr_lerpvar
function scr_lerpvar()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar;
}
function scr_lerpvar_respect()
{
if (argument_count < 6)
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3]);
else
___lerpvar = scr_lerpvar_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
___lerpvar.respectglobalinteract = true;
return ___lerpvar;
} ("image_alpha", 1, 0, 30, -1, "out");
|
|
85
|
scr_doomscr_doom
function scr_doom(arg0 = id, arg1)
{
with (instance_create_depth(0, 0, 0, obj_doom))
{
alarm[0]
target = arg0;
persistent = arg0.persistent;
}
} (id, 30);
|
|
86
|
}
|
|
87
|
layer_set_visible("TILES_SHORTCUTBRIDGE", true);
|
|
88
|
layer_set_visible("ASSETS_SHORTCUTBRIDGE", true);
|
|
89
|
safe_delete(b2blocker);
|
|
90
|
bcon2 = 1;
|
|
91
|
}
|
|
92
|
}
|