|
1
|
if (con == 0 && global.interact == 0 && keyboard_check_pressed(ord("B")) && scr_debugscr_debug
function scr_debug()
{
return 0;
} ())
|
|
2
|
{
|
|
3
|
susid = -4;
|
|
4
|
var bossid = id;
|
|
5
|
with (obj_caterpillarchara)
|
|
6
|
{
|
|
7
|
if (name == "susie")
|
|
8
|
{
|
|
9
|
visible = 0;
|
|
10
|
bossid.caterpillarid = id;
|
|
11
|
bossid.susid = instance_create(x, y, obj_actor);
|
|
12
|
with (bossid.susid)
|
|
13
|
{
|
|
14
|
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;
}
... ("susie");
|
|
15
|
sprite_index = rsprite;
|
|
16
|
}
|
|
17
|
}
|
|
18
|
}
|
|
19
|
if (susid == -4)
|
|
20
|
{
|
|
21
|
instance_destroy();
|
|
22
|
}
|
|
23
|
else
|
|
24
|
{
|
|
25
|
con = 1;
|
|
26
|
timer = 0;
|
|
27
|
overalltimer = 0;
|
|
28
|
}
|
|
29
|
}
|
|
30
|
if (con == 1)
|
|
31
|
{
|
|
32
|
if (global.interact == 0)
|
|
33
|
{
|
|
34
|
with (susid)
|
|
35
|
{
|
|
36
|
fake_direction = direction;
|
|
37
|
fake_speed = scr_move_step_solids_directionscr_move_step_solids_direction
function scr_move_step_solids_direction(arg0, arg1)
{
var __mx = lengthdir_x(arg0, arg1);
var __my = lengthdir_y(arg0, arg1);
if (place_meeting(x + __mx, y + __my, obj_solidblock))
{
if (!place_meeting(x + __mx, y, obj_solidblock))
__my = 0;
else if (!place_meeting(x, y + __my, obj_solidblock))
__mx = 0;
}
x += __mx;
y += __my;
return point_distance(0, 0, __mx, __my);
} (4, direction);
|
|
38
|
}
|
|
39
|
timer++;
|
|
40
|
if (timer >= 30)
|
|
41
|
{
|
|
42
|
with (susid)
|
|
43
|
direction += 90;
|
|
44
|
timer = 0;
|
|
45
|
}
|
|
46
|
overalltimer++;
|
|
47
|
if (overalltimer >= 120)
|
|
48
|
con = 2;
|
|
49
|
}
|
|
50
|
else
|
|
51
|
{
|
|
52
|
with (susid)
|
|
53
|
fake_speed = 0;
|
|
54
|
}
|
|
55
|
}
|
|
56
|
if (con == 2)
|
|
57
|
{
|
|
58
|
if (global.interact == 0)
|
|
59
|
{
|
|
60
|
var caid = caterpillarid;
|
|
61
|
with (susid)
|
|
62
|
{
|
|
63
|
direction = point_direction(x, y, caid.x, caid.y);
|
|
64
|
fake_direction = direction;
|
|
65
|
fake_speed = scr_move_step_solids_directionscr_move_step_solids_direction
function scr_move_step_solids_direction(arg0, arg1)
{
var __mx = lengthdir_x(arg0, arg1);
var __my = lengthdir_y(arg0, arg1);
if (place_meeting(x + __mx, y + __my, obj_solidblock))
{
if (!place_meeting(x + __mx, y, obj_solidblock))
__my = 0;
else if (!place_meeting(x, y + __my, obj_solidblock))
__mx = 0;
}
x += __mx;
y += __my;
return point_distance(0, 0, __mx, __my);
} (8, direction);
|
|
66
|
}
|
|
67
|
if ((abs(susid.x - caterpillarid.x) + abs(susid.y - caterpillarid.y)) < 12)
|
|
68
|
{
|
|
69
|
with (susid)
|
|
70
|
instance_destroy();
|
|
71
|
caterpillarid.visible = 1;
|
|
72
|
con = 0;
|
|
73
|
instance_destroy();
|
|
74
|
}
|
|
75
|
}
|
|
76
|
else
|
|
77
|
{
|
|
78
|
with (susid)
|
|
79
|
fake_speed = 0;
|
|
80
|
}
|
|
81
|
}
|