1 |
siner += image_xscale; |
2 |
if (mode == 0) |
3 |
y += (sin(siner / 12) * 5); |
4 |
if (mode == 1) |
5 |
y += (sin(siner / 16) * 3); |
6 |
amp = 0; |
7 |
threshold = 18; |
8 |
if (mode == 0) |
9 |
threshold = 22; |
10 |
timer++; |
11 |
if (timer >= threshold) |
12 |
{ |
13 |
shot[shotcount] = instance_create(x, y, obj_collidebullet); |
14 |
shot[shotcount].sprite_index = spr_spadebullet; |
15 |
shot[shotcount].image_yscale = 0.5; |
16 |
shot[shotcount].image_xscale = 0.5 * image_xscale; |
17 |
shot[shotcount].active = 1; |
18 |
singletimer[shotcount] = 0; |
19 |
shotcount++; |
20 |
timer = 0; |
21 |
} |
22 |
for (i = 0; i < shotcount; i++) |
23 |
{ |
24 |
if (i_ex(shot[i])) |
25 |
{ |
26 |
if (mode == 0) |
27 |
shot[i].x = x + (singletimer[i] * 3 * -image_xscale); |
28 |
if (mode == 0) |
29 |
shot[i].y = y + (sin(abs(siner / 14)) * 30); |
30 |
if (mode == 1) |
31 |
{ |
32 |
shot[i].x = x + (singletimer[i] * 3 * ((amp / 60) + 1) * -image_xscale); |
33 |
amp = abs(sin(siner / 18) * 30); |
34 |
shot[i].y = y + (sin(abs(siner / 14) + (singletimer[i] / 14)) * amp); |
35 |
} |
36 |
singletimer[i]++; |
37 |
} |
38 |
} |