1 | draw_sprite_ext(sprite_index, 1, x, y, image_xscale * bodyflip, image_yscale, 0, c_white, image_alpha); |
2 | draw_sprite_ext(sprite_index, headimage + headframe, x + (sin(siner / 3) * 2), y, image_xscale, image_yscale, 0, c_white, image_alpha); |
3 | siner++; |
4 | x += (sin(siner / 8) * 3); |
5 | timer++; |
6 | if (timer >= 11) |
7 | { |
8 | frame = 1; |
9 | timer = 0; |
10 | } |
11 | if (frame == 1) |
12 | { |
13 | bodyflip *= -1; |
14 | frame = 0; |
15 | } |
16 | if (shoottimer >= 22) |
17 | { |
18 | active = 1; |
19 | shoottimer -= 22; |
20 | } |
21 | if (active == 1) |
22 | { |
23 | if (headframe == 0) |
24 | { |
25 | anim = instance_create((x - 40) + random(80), y - 106, obj_afterimage); |
26 | anim.sprite_index = spr_musicalbattlenote1; |
27 | anim.depth = depth - 5; |
28 | anim.image_xscale = 2; |
29 | anim.image_yscale = 2; |
30 | anim.direction = 270; |
31 | anim.gravity = -0.2; |
32 | anim.hspeed = random_range(0.1, 0.8) * choose(1, -1); |
33 | headframe = 1; |
34 | } |
35 | headframe += 0.5; |
36 | if (headframe >= 2.5) |
37 | active = 0; |
38 | } |
39 | else |
40 | { |
41 | headframe = 0; |
42 | } |