|
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
|
obj_cloud_controller_new.harmless = 1;
|
|
5
|
obj_cloud_controller_new.miny = 5240;
|
|
6
|
obj_cloud_controller_new.minspeed = 0;
|
|
7
|
obj_cloud_controller_new.maxspeed = 0;
|
|
8
|
obj_cloud_controller_new.cloud_angle = 1;
|
|
9
|
obj_cloud_controller_new.rotatespeed = 0;
|
|
10
|
init = 1;
|
|
11
|
if (global.tempflag[90] == 1)
|
|
12
|
{
|
|
13
|
global.tempflag[90] = 0;
|
|
14
|
con = 2;
|
|
15
|
blackout = 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];
} (0, 0, spr_pxwhite, room_width, room_height, undefined, undefined, c_black, -5);
|
|
16
|
with (blackout)
|
|
17
|
{
|
|
18
|
var fadetime = 30;
|
|
19
|
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.5, 0, fadetime);
|
|
20
|
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, fadetime);
|
|
21
|
}
|
|
22
|
}
|
|
23
|
if (obj_mainchara.y > 6000)
|
|
24
|
{
|
|
25
|
obj_cloud_controller_new.y += -780;
|
|
26
|
with (obj_cloud_render_new)
|
|
27
|
{
|
|
28
|
xoffset = 800;
|
|
29
|
distance_from_kris -= 880;
|
|
30
|
}
|
|
31
|
}
|
|
32
|
else
|
|
33
|
{
|
|
34
|
obj_cloud_controller_new.y = 5240;
|
|
35
|
obj_cloud_controller_new.active = 1;
|
|
36
|
obj_mainchara.cutscene = 1;
|
|
37
|
camerax_set(0);
|
|
38
|
cameray_set(4840);
|
|
39
|
with (obj_cloud_render_new)
|
|
40
|
{
|
|
41
|
followcamera = true;
|
|
42
|
xoffset = 0;
|
|
43
|
distance_from_kris = 200;
|
|
44
|
}
|
|
45
|
}
|
|
46
|
}
|
|
47
|
if (!obj_cloud_controller_new.active)
|
|
48
|
{
|
|
49
|
with (obj_cloud_render_new)
|
|
50
|
{
|
|
51
|
if (obj_mainchara.y < 8440)
|
|
52
|
xoffset = 800;
|
|
53
|
else
|
|
54
|
xoffset = -9999;
|
|
55
|
}
|
|
56
|
}
|
|
57
|
if (obj_mainchara.x >= 900 && obj_cloud_controller_new.minspeed == 0)
|
|
58
|
{
|
|
59
|
obj_cloud_controller_new.minspeed = -0.2;
|
|
60
|
obj_cloud_controller_new.maxspeed = -1.5;
|
|
61
|
obj_cloud_controller_new.active = 1;
|
|
62
|
with (obj_cloud_render_new)
|
|
63
|
{
|
|
64
|
followcamera = true;
|
|
65
|
if (!front)
|
|
66
|
{
|
|
67
|
}
|
|
68
|
}
|
|
69
|
}
|
|
70
|
if (con == 1)
|
|
71
|
{
|
|
72
|
timer++;
|
|
73
|
if (timer == 1)
|
|
74
|
{
|
|
75
|
obj_mainchara.cutscene = 1;
|
|
76
|
scr_fadeoutscr_fadeout
function scr_fadeout(arg0)
{
__fadeouter = instance_create(camerax() - 200, cameray() - 200, obj_fadeout);
__fadeouter.fadespeed = 1 / arg0;
__fadeouter.depth = 3;
return __fadeouter;
} (15);
|
|
77
|
}
|
|
78
|
if (timer == 20)
|
|
79
|
{
|
|
80
|
global.tempflag[90] = 1;
|
|
81
|
room_restart();
|
|
82
|
}
|
|
83
|
}
|
|
84
|
if (con == 2)
|
|
85
|
{
|
|
86
|
susie.x = obj_mainchara.x - 20;
|
|
87
|
susie.y = obj_mainchara.y - 60;
|
|
88
|
ralsei.x = obj_mainchara.x + 10;
|
|
89
|
ralsei.y = obj_mainchara.y - 100;
|
|
90
|
global.interact = 1;
|
|
91
|
cutscene_master = scr_cutscene_makescr_cutscene_make
function scr_cutscene_make()
{
_cutscene_master = instance_create(0, 0, obj_cutscene_master);
_cutscene_master.master_object = id;
return _cutscene_master;
} ();
|
|
92
|
scr_maincharacters_actorsscr_maincharacters_actors
function scr_maincharacters_actors()
{
actor_count = 0;
kr = 0;
kr_actor = instance_create(obj_mainchara.x, obj_mainchara.y, obj_actor);
scr_actor_setup(kr, kr_actor, "kris");
kr_actor.sprite_index = obj_mainchara.sprite_index;
kr_actor.depth = obj_mainchara.depth;
with (obj_mainchara)
visible = 0;
for (__jj = 0; __jj < array_length_1d(global.cinstance); __jj++)
{
if (i_ex(global.cinstance[__jj]))
{
if (global.cinstance[__jj].name == "susie")
{
actor_count++;
su = __jj + 1;
su_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(su, su_actor, "susie");
su_actor.sprite_index = global.cinstance[__jj].sprite_index;
su_actor.depth = global.cinstance[__jj].depth;
with (global.cinstance[__jj])
visible = 0;
}
if (global.cinstance[__jj].name == "ralsei")
{
actor_count++;
ra = __jj + 1;
ra_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(ra, ra_actor, "ralsei");
ra_actor.sprite_index = global.cinstance[__jj].sprite_index;
ra_actor.depth = global.cinstance[__jj].depth;
with (global.cinstance[__jj])
visible = 0;
}
if (global.cinstance[__jj].name == "noelle")
{
actor_count++;
no = __jj + 1;
no_actor = instance_create(global.cinstance[__jj].x, global.cinstance[__jj].y, obj_actor);
scr_actor_setup(no, no_actor, "noelle");
no_actor.sprite_index = global.cinstance[__jj].sprite_index;
no_actor.depth = global.cinstance[__jj].depth;
with (global.cinstance[__jj])
visible = 0;
}
}
}
} ();
|
|
93
|
c_fadeoutc_fadeout
function c_fadeout(arg0)
{
c_cmd("fadeout", arg0, 0, 0, 0);
} (0);
|
|
94
|
c_selc_sel
function c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
} (kr);
|
|
95
|
c_facingc_facing
function c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
} ("d");
|
|
96
|
c_spritec_sprite
function c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
} (spr_kris_injured);
|
|
97
|
c_selc_sel
function c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
} (ra);
|
|
98
|
c_facingc_facing
function c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
} ("d");
|
|
99
|
c_spritec_sprite
function c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
} (spr_ralsei_kneel_serious);
|
|
100
|
c_selc_sel
function c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
} (su);
|
|
101
|
c_facingc_facing
function c_facing(arg0)
{
c_cmd("facing", arg0, 0, 0, 0);
} ("d");
|
|
102
|
c_spritec_sprite
function c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
} (spr_susie_dw_landed);
|
|
103
|
c_waitc_wait
function c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
} (25);
|
|
104
|
c_fadeinc_fadein
function c_fadein(arg0)
{
c_cmd("fadeout", -arg0, 0, 0, 0);
} (30);
|
|
105
|
c_waitc_wait
function c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
} (30);
|
|
106
|
c_waitc_wait
function c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
} (5);
|
|
107
|
c_selc_sel
function c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
} (kr);
|
|
108
|
c_snd_play(snd_noise);
|
|
109
|
c_spritec_sprite
function c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
} (spr_krisd_dark);
|
|
110
|
c_shakeobjc_shakeobj
function c_shakeobj()
{
c_cmd("shakeobj", 0, 0, 0, 0);
} ();
|
|
111
|
c_waitc_wait
function c_wait(arg0)
{
c_cmd("wait", arg0, 0, 0, 0);
} (25);
|
|
112
|
c_selc_sel
function c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
} (ra);
|
|
113
|
c_spritec_sprite
function c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
} (spr_ralseid);
|
|
114
|
c_selc_sel
function c_sel(arg0)
{
c_cmd("select", arg0, 0, 0, 0);
} (su);
|
|
115
|
c_spritec_sprite
function c_sprite(arg0)
{
c_cmd("sprite", arg0, 0, 0, 0);
} (spr_susied);
|
|
116
|
c_actortokrisc_actortokris
function c_actortokris()
{
c_cmd("actortokris", 0, 0, 0, 0);
} ();
|
|
117
|
c_actortocaterpillarc_actortocaterpillar
function c_actortocaterpillar()
{
c_cmd("actortocaterpillar", 0, 0, 0, 0);
} ();
|
|
118
|
c_terminatekillactorsc_terminatekillactors
function c_terminatekillactors()
{
c_cmd("terminatekillactors", 0, 0, 0, 0);
} ();
|
|
119
|
con = 3;
|
|
120
|
}
|
|
121
|
if (con == 3)
|
|
122
|
{
|
|
123
|
if (!instance_exists(obj_cutscene_master))
|
|
124
|
{
|
|
125
|
global.facing = 0;
|
|
126
|
global.interact = 0;
|
|
127
|
obj_mainchara.cutscene = 0;
|
|
128
|
obj_mainchara.freeze = false;
|
|
129
|
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");
|
|
130
|
con = 0;
|
|
131
|
}
|
|
132
|
}
|