1 |
function scr_boltcheckscr_boltcheckfunction scr_boltcheck(argument0) //gml_Script_scr_boltcheck
{
pressbuffer[global.char[argument0]] = 5
qualifybolt = -1
close = 99
topclose = 99
for (i = 0; i < bolttotal; i += 1)
{
if (boltchar[i] == argument0 && boltalive[i] == 1)
{
close = boltframe[i] - boltx
if (close < 15 && close > -5)
{
if (close < topclose)
{
topclose = close
qualifybolt = i
}
}
}
}
if (qualifybolt != -1)
{
p = abs(topclose)
burstbolt = instance_create((x + 80 + boltframe[qualifybolt] * boltspeed - boltx * boltspeed), (y + 38 * argument0), obj_burstbolt)
if (p == 0)
{
points[argument0] += 150
with (burstbolt)
image_blend = c_yellow
with (burstbolt)
mag = 0.2
}
if (p == 1)
points[argument0] += 120
if (p == 2)
points[argument0] += 110
if (p >= 3)
{
points[argument0] += (100 - abs(topclose) * 2)
burstbolt.image_blend = boltcolor[argument0]
}
if (p >= 15)
burstbolt.image_blend = charcolor[argument0]
boltalive[qualifybolt] = 0
}
} (argument0) //gml_Script_scr_boltcheck |
2 |
{ |
3 |
pressbuffer[global.char[argument0]] = 5 |
4 |
qualifybolt = -1 |
5 |
close = 99 |
6 |
topclose = 99 |
7 |
for (i = 0; i < bolttotal; i += 1) |
8 |
{ |
9 |
if (boltchar[i] == argument0 && boltalive[i] == 1) |
10 |
{ |
11 |
close = boltframe[i] - boltx |
12 |
if (close < 15 && close > -5) |
13 |
{ |
14 |
if (close < topclose) |
15 |
{ |
16 |
topclose = close |
17 |
qualifybolt = i |
18 |
} |
19 |
} |
20 |
} |
21 |
} |
22 |
if (qualifybolt != -1) |
23 |
{ |
24 |
p = abs(topclose) |
25 |
burstbolt = instance_create((x + 80 + boltframe[qualifybolt] * boltspeed - boltx * boltspeed), (y + 38 * argument0), obj_burstbolt) |
26 |
if (p == 0) |
27 |
{ |
28 |
points[argument0] += 150 |
29 |
with (burstbolt) |
30 |
image_blend = c_yellow |
31 |
with (burstbolt) |
32 |
mag = 0.2 |
33 |
} |
34 |
if (p == 1) |
35 |
points[argument0] += 120 |
36 |
if (p == 2) |
37 |
points[argument0] += 110 |
38 |
if (p >= 3) |
39 |
{ |
40 |
points[argument0] += (100 - abs(topclose) * 2) |
41 |
burstbolt.image_blend = boltcolor[argument0] |
42 |
} |
43 |
if (p >= 15) |
44 |
burstbolt.image_blend = charcolor[argument0] |
45 |
boltalive[qualifybolt] = 0 |
46 |
} |
47 |
} |