|
1
|
if (con == 10)
|
|
2
|
{
|
|
3
|
mus_volume(global.currentsong[1], 0, 30);
|
|
4
|
if (instance_exists(obj_mainchara))
|
|
5
|
{
|
|
6
|
obj_mainchara.visible = 0;
|
|
7
|
kr_actor = instance_create_depth(obj_mainchara.x, obj_mainchara.y, obj_mainchara.depth, obj_actor);
|
|
8
|
kr_actor.sprite_index = obj_mainchara.sprite_index;
|
|
9
|
kr_actor.__x = kris_x + 6;
|
|
10
|
kr_actor.__y = kris_y + 20;
|
|
11
|
kr_walktime = scr_calculate_move_distancescr_calculate_move_distance
function scr_calculate_move_distance(arg0, arg1, arg2, arg3, arg4 = 6)
{
var move_time = 1;
var distance_time = round(point_distance(arg0, arg1, arg2, arg3) / arg4);
if (distance_time > move_time)
move_time = distance_time;
return move_time;
} (kr_actor.x, kr_actor.y, kr_actor.__x, kr_actor.__y, 4);
|
|
12
|
var walktime = kr_walktime;
|
|
13
|
with (kr_actor)
|
|
14
|
{
|
|
15
|
scr_set_facing_spritesscr_set_facing_sprites
function scr_set_facing_sprites(arg0)
{
_actorname = arg0;
name = arg0;
if (is_string(_actorname))
{
if (_actorname == "kris")
{
name = "kris";
if (global.darkzone == 0)
_actorname = "krislight";
if (global.darkzone == 1)
_actorname = "krisdark";
}
if (_actorname == "susie")
{
name = "susie";
if (global.darkzone == 0)
{
_actorname = "susielight";
if (global.chapter >= 2)
_actorname = "susielighteyes";
}
if (global.darkzone == 1)
{
if (global.chapter == 1)
_actorname = "susiedark";
if (global.chapter >= 2)
_actorname = "susiedarkeyes";
}
}
if (_actorname == "ralsei")
{
name = "ralsei";
if (global.chapter <= 1)
_actorname = "ralseihat";
if (global.chapter > 1)
_actorname = "ralseinohat";
}
if (_actorname == "noelle")
{
name = "noelle";
if (global.darkzone == 0)
_actorname = "noellelight";
if (global.darkzone == 1)
_actorname = "noelledark";
}
if (_actorname == "berdly")
{
name = "berdly";
if (global.darkzone == 0)
_actorname = "berdlylight";
if (global.darkzone == 1)
_actorname = "berdlydark";
}
if (_actorname == "krislight")
{
usprite = spr_krisu;
rsprite = spr_krisr;
dsprite = spr_krisd;
lsprite = spr_krisl;
}
if (_actorname == "krisdark")
{
usprite = spr_krisu_dark;
rsprite = spr_krisr_dark;
dsprite = spr_krisd_dark;
lsprite = spr_krisl_dark;
}
if (_actorname == "susielight")
{
usprite = spr_susieu;
rsprite = spr_susier;
dsprite = spr_susied;
lsprite = spr_susiel;
}
if (_actorname == "susielighteyes")
{
usprite = spr_susie_walk_up_lw;
rsprite = spr_susie_walk_right_lw;
dsprite = spr_susie_walk_down_lw;
lsprite = spr_susie_walk_left_lw;
}
if (_actorname == "susiedark")
{
usprite = spr_susieu_dark;
rsprite = spr_susier_dark;
dsprite = spr_susied_dark;
lsprite = spr_susiel_dark;
specialsprite[4] = spr_susie_shock_r;
specialsprite[5] = spr_susie_shock;
}
if (_actorname == "susiedarkeyes")
{
usprite = spr_susie_walk_up_dw;
rsprite = spr_susie_walk_right_dw;
dsprite = spr_susie_walk_down_dw;
lsprite = spr_susie_walk_left_dw;
specialsprite[4] = spr_susie_shock_r;
specialsprite[5] = spr_susie_shock;
}
... ("kris");
|
|
16
|
fun = 1;
|
|
17
|
image_speed = 0.25;
|
|
18
|
scr_move_to_point_over_timescr_move_to_point_over_time
function scr_move_to_point_over_time(arg0, arg1, arg2)
{
_mmm = instance_create(x, y, obj_move_to_point);
_mmm.target = id;
_mmm.movex = arg0;
_mmm.movey = arg1;
_mmm.movemax = arg2;
return _mmm;
} (__x, __y, walktime);
|
|
19
|
}
|
|
20
|
}
|
|
21
|
contimer = 0;
|
|
22
|
con = 11;
|
|
23
|
}
|
|
24
|
if (con == 11)
|
|
25
|
{
|
|
26
|
contimer++;
|
|
27
|
if (contimer >= (kr_walktime + 4))
|
|
28
|
{
|
|
29
|
con = 1;
|
|
30
|
with (obj_actor)
|
|
31
|
{
|
|
32
|
if (name == "kris")
|
|
33
|
visible = 0;
|
|
34
|
}
|
|
35
|
with (obj_dw_leave_ch4)
|
|
36
|
{
|
|
37
|
if (bottom == 1)
|
|
38
|
draw_kris = 1;
|
|
39
|
}
|
|
40
|
with (obj_dw_leave_ch4)
|
|
41
|
{
|
|
42
|
if (bottom == 1)
|
|
43
|
con = 15;
|
|
44
|
else
|
|
45
|
con = 1;
|
|
46
|
}
|
|
47
|
}
|
|
48
|
}
|