1 |
if (type == 0) |
2 |
{ |
3 |
timer++; |
4 |
if (timer == 1) |
5 |
{ |
6 |
instancemax = 0; |
7 |
for (var i = 0; i < instance_count; i += 1) |
8 |
{ |
9 |
if (instance_id[i] != noone && instance_id[i].depth >= 5000 && instance_id[i].depth <= 100000 && instance_id[i].visible == 1 && instance_id[i].sprite_index >= 1) |
10 |
{ |
11 |
listinstance[instancemax] = instance_id[i]; |
12 |
instancemax++; |
13 |
} |
14 |
} |
15 |
for (var i = 0; i < instancemax; i++) |
16 |
{ |
17 |
shadow[i] = instance_create(x, y, obj_marker); |
18 |
frontshadow[i] = instance_create(x, y, obj_marker); |
19 |
} |
20 |
} |
21 |
if (timer >= 1) |
22 |
{ |
23 |
for (var i = 0; i < instancemax; i++) |
24 |
{ |
25 |
with (shadow[i]) |
26 |
{ |
27 |
sprite_index = other.listinstance[other.i].sprite_index; |
28 |
image_index = other.listinstance[other.i].image_index; |
29 |
image_xscale = other.listinstance[other.i].image_xscale; |
30 |
image_yscale = other.listinstance[other.i].image_yscale * -1 * other.shadLength; |
31 |
x = other.listinstance[other.i].x; |
32 |
y = (other.listinstance[other.i].y + (sprite_height * image_yscale)) - 4; |
33 |
image_blend = other.floorShadowColor; |
34 |
image_alpha = other.floorshadOpacity; |
35 |
depth = 900000; |
36 |
} |
37 |
with (frontshadow[i]) |
38 |
{ |
39 |
sprite_index = other.listinstance[other.i].sprite_index; |
40 |
image_xscale = other.listinstance[other.i].image_xscale; |
41 |
image_yscale = other.listinstance[other.i].image_yscale; |
42 |
x = other.listinstance[other.i].x; |
43 |
y = other.listinstance[other.i].y + 4; |
44 |
image_blend = other.frontShadowColor; |
45 |
image_alpha = other.frontshadOpacity; |
46 |
image_index = other.listinstance[other.i].image_index; |
47 |
depth = other.listinstance[other.i].depth - 1; |
48 |
} |
49 |
} |
50 |
} |
51 |
} |
52 |
if (type == 1) |
53 |
{ |
54 |
if (init == 0) |
55 |
{ |
56 |
instancemax = 0; |
57 |
with (obj_mainchara) |
58 |
{ |
59 |
other.listinstance[other.instancemax] = id; |
60 |
other.instancemax++; |
61 |
} |
62 |
with (obj_npc_butler) |
63 |
{ |
64 |
other.listinstance[other.instancemax] = id; |
65 |
other.instancemax++; |
66 |
} |
67 |
with (obj_caterpillarchara) |
68 |
{ |
69 |
other.listinstance[other.instancemax] = id; |
70 |
other.instancemax++; |
71 |
} |
72 |
init = 1; |
73 |
} |
74 |
if (init == 1) |
75 |
{ |
76 |
for (var i = 0; i < instancemax; i++) |
77 |
{ |
78 |
shadow[i] = instance_create(x, y, obj_marker); |
79 |
frontshadow[i] = instance_create(x, y, obj_marker); |
80 |
} |
81 |
init = 2; |
82 |
} |
83 |
if (init == 2) |
84 |
{ |
85 |
for (var i = 0; i < instancemax; i++) |
86 |
{ |
87 |
with (shadow[i]) |
88 |
{ |
89 |
sprite_index = other.listinstance[i].sprite_index; |
90 |
image_index = other.listinstance[i].image_index; |
91 |
image_xscale = other.listinstance[i].image_xscale; |
92 |
image_yscale = other.listinstance[i].image_yscale * -1 * other.shadLength; |
93 |
x = other.listinstance[i].x; |
94 |
y = (other.listinstance[i].y + (sprite_height * image_yscale)) - 4; |
95 |
image_blend = other.floorShadowColor; |
96 |
image_alpha = other.floorshadOpacity; |
97 |
depth = 900000; |
98 |
} |
99 |
with (frontshadow[i]) |
100 |
{ |
101 |
sprite_index = other.listinstance[i].sprite_index; |
102 |
image_xscale = other.listinstance[i].image_xscale; |
103 |
image_yscale = other.listinstance[i].image_yscale; |
104 |
x = other.listinstance[i].x; |
105 |
y = other.listinstance[i].y + 4; |
106 |
image_blend = other.frontShadowColor; |
107 |
image_alpha = other.frontshadOpacity; |
108 |
image_index = other.listinstance[i].image_index; |
109 |
depth = other.listinstance[i].depth - 1; |
110 |
} |
111 |
} |
112 |
} |
113 |
} |