1 |
function scr_boltcheck_onebutton_ch1scr_boltcheck_onebutton_ch1function scr_boltcheck_onebutton_ch1()
{
dualbolt = -1;
dualboltid = -1;
pressbuffer[0] = 5;
pressbuffer[1] = 5;
pressbuffer[2] = 5;
qualifybolt = -1;
close = 99;
topclose = 999;
for (i = 0; i < bolttotal; i += 1)
{
if (boltalive[i] == 1)
{
close = boltframe[i] - boltx;
if (close < 15 && close > -5)
{
if (close == topclose)
{
dualbolt = 1;
dualboltid = i;
}
if (close < topclose)
{
topclose = close;
qualifybolt = i;
}
}
}
}
if (qualifybolt != -1)
{
bc = boltchar[qualifybolt];
p = abs(topclose);
burstbolt = instance_create_ch1((x + 80 + (boltframe[qualifybolt] * boltspeed)) - (boltx * boltspeed), y + (38 * bc), obj_burstbolt_ch1);
if (p == 0)
{
points[bc] += 150;
with (burstbolt)
image_blend = c_yellow;
with (burstbolt)
mag = 0.2;
}
if (p == 1)
points[bc] += 120;
if (p == 2)
points[bc] += 110;
if (p >= 3)
{
points[bc] += 100 - (abs(topclose) * 2);
burstbolt.image_blend = boltcolor[bc];
}
if (p >= 15)
burstbolt.image_blend = charcolor[bc];
boltalive[qualifybolt] = 0;
if (dualbolt == 1)
{
bc = boltchar[dualboltid];
p = abs(topclose);
burstbolt = instance_create_ch1((x + 80 + (boltframe[dualboltid] * boltspeed)) - (boltx * boltspeed), y + (38 * bc), obj_burstbolt_ch1);
if (p == 0)
{
points[bc] += 150;
with (burstbolt)
image_blend = c_yellow;
with (burstbolt)
mag = 0.2;
}
if (p == 1)
points[bc] += 120;
if (p == 2)
points[bc] += 110;
if (p >= 3)
{
points[bc] += 100 - (abs(topclose) * 2);
burstbolt.image_blend = boltcolor[bc];
}
if (p >= 15)
burstbolt.image_blend = charcolor[bc];
boltalive[dualboltid] = 0;
}
}
} () |
2 |
{ |
3 |
dualbolt = -1; |
4 |
dualboltid = -1; |
5 |
pressbuffer[0] = 5; |
6 |
pressbuffer[1] = 5; |
7 |
pressbuffer[2] = 5; |
8 |
qualifybolt = -1; |
9 |
close = 99; |
10 |
topclose = 999; |
11 |
for (i = 0; i < bolttotal; i += 1) |
12 |
{ |
13 |
if (boltalive[i] == 1) |
14 |
{ |
15 |
close = boltframe[i] - boltx; |
16 |
if (close < 15 && close > -5) |
17 |
{ |
18 |
if (close == topclose) |
19 |
{ |
20 |
dualbolt = 1; |
21 |
dualboltid = i; |
22 |
} |
23 |
if (close < topclose) |
24 |
{ |
25 |
topclose = close; |
26 |
qualifybolt = i; |
27 |
} |
28 |
} |
29 |
} |
30 |
} |
31 |
if (qualifybolt != -1) |
32 |
{ |
33 |
bc = boltchar[qualifybolt]; |
34 |
p = abs(topclose); |
35 |
burstbolt = instance_create_ch1((x + 80 + (boltframe[qualifybolt] * boltspeed)) - (boltx * boltspeed), y + (38 * bc), obj_burstbolt_ch1); |
36 |
if (p == 0) |
37 |
{ |
38 |
points[bc] += 150; |
39 |
with (burstbolt) |
40 |
image_blend = c_yellow; |
41 |
with (burstbolt) |
42 |
mag = 0.2; |
43 |
} |
44 |
if (p == 1) |
45 |
points[bc] += 120; |
46 |
if (p == 2) |
47 |
points[bc] += 110; |
48 |
if (p >= 3) |
49 |
{ |
50 |
points[bc] += 100 - (abs(topclose) * 2); |
51 |
burstbolt.image_blend = boltcolor[bc]; |
52 |
} |
53 |
if (p >= 15) |
54 |
burstbolt.image_blend = charcolor[bc]; |
55 |
boltalive[qualifybolt] = 0; |
56 |
if (dualbolt == 1) |
57 |
{ |
58 |
bc = boltchar[dualboltid]; |
59 |
p = abs(topclose); |
60 |
burstbolt = instance_create_ch1((x + 80 + (boltframe[dualboltid] * boltspeed)) - (boltx * boltspeed), y + (38 * bc), obj_burstbolt_ch1); |
61 |
if (p == 0) |
62 |
{ |
63 |
points[bc] += 150; |
64 |
with (burstbolt) |
65 |
image_blend = c_yellow; |
66 |
with (burstbolt) |
67 |
mag = 0.2; |
68 |
} |
69 |
if (p == 1) |
70 |
points[bc] += 120; |
71 |
if (p == 2) |
72 |
points[bc] += 110; |
73 |
if (p >= 3) |
74 |
{ |
75 |
points[bc] += 100 - (abs(topclose) * 2); |
76 |
burstbolt.image_blend = boltcolor[bc]; |
77 |
} |
78 |
if (p >= 15) |
79 |
burstbolt.image_blend = charcolor[bc]; |
80 |
boltalive[dualboltid] = 0; |
81 |
} |
82 |
} |
83 |
} |