1 |
futuredir = point_direction(x, y, obj_heart.x + 8, obj_heart.y + 8); |
2 |
if (active == 0) |
3 |
{ |
4 |
draw_sprite_ext(sprite_index, image_index, x, y, 3 - (image_alpha * 2), 3 - (image_alpha * 2), futuredir, c_white, 1 - image_alpha); |
5 |
if (image_alpha < 1) |
6 |
{ |
7 |
image_alpha += 0.1; |
8 |
} |
9 |
else |
10 |
{ |
11 |
active = 1; |
12 |
activetimer = timetarg - 1; |
13 |
} |
14 |
} |
15 |
draw_sprite_ext(sprite_index, image_index, x, y, 2 - image_alpha, 2 - image_alpha, futuredir, c_white, image_alpha); |
16 |
if (active == 1) |
17 |
{ |
18 |
activetimer++; |
19 |
if (activetimer == timetarg) |
20 |
{ |
21 |
snd = snd_play(snd_egg); |
22 |
snd_pitch(snd, 1 + (timesfired / times / 2)); |
23 |
mybul = instance_create(x, y, obj_regularbullet); |
24 |
mybul.grazepoints = grazepoints; |
25 |
mybul.damage = damage; |
26 |
mybul.target = target; |
27 |
mybul.sprite_index = spr_ch2_dojo_puzzlebullet_solid; |
28 |
mybul.image_index = image_index; |
29 |
mybul.direction = futuredir; |
30 |
with (mybul) |
31 |
{ |
32 |
spin = 1; |
33 |
spinspeed = 12; |
34 |
image_speed = 0; |
35 |
speed = other.bulletspeed; |
36 |
image_angle = direction; |
37 |
depth = other.depth; |
38 |
bottomfade = 246; |
39 |
} |
40 |
timesfired++; |
41 |
if (timesfired < times) |
42 |
activetimer = 0; |
43 |
else |
44 |
active = 2; |
45 |
} |
46 |
} |
47 |
if (active == 2) |
48 |
{ |
49 |
image_alpha *= 0.7; |
50 |
if (image_alpha <= 0.01) |
51 |
instance_destroy(); |
52 |
} |