1 |
if (con == 0) |
2 |
{ |
3 |
if (sndcon == 0) |
4 |
{ |
5 |
snd_stop(snd_swing); |
6 |
snd_play(snd_swing); |
7 |
sndcon = 1; |
8 |
} |
9 |
image_index = 0; |
10 |
if (image_xscale < 2) |
11 |
{ |
12 |
image_xscale += 0.4; |
13 |
} |
14 |
else |
15 |
{ |
16 |
image_xscale = 2; |
17 |
con = 1; |
18 |
timer = 0; |
19 |
} |
20 |
} |
21 |
if (con == 1) |
22 |
{ |
23 |
timer += 1; |
24 |
if (timer >= 8) |
25 |
{ |
26 |
if (sndcon == 1 && type < 3) |
27 |
{ |
28 |
snd_play(snd_joker_oh); |
29 |
sndcon = 2; |
30 |
} |
31 |
image_index = 1; |
32 |
con = 2; |
33 |
timer = 0; |
34 |
if (type == 0) |
35 |
{ |
36 |
bullet = instance_create(x, y, obj_collidebullet); |
37 |
bullet.sprite_index = spr_diamondbullet; |
38 |
bullet.active = 1; |
39 |
scr_bullet_inheritscr_bullet_inheritfunction scr_bullet_inherit(arg0)
{
if (instance_exists(arg0))
{
arg0.damage = damage;
arg0.grazepoints = grazepoints;
arg0.timepoints = timepoints;
arg0.inv = inv;
arg0.target = target;
arg0.grazed = 0;
arg0.grazetimer = 0;
}
} (bullet); |
40 |
with (bullet) |
41 |
{ |
42 |
move_towards_point(obj_heart.x + 10, obj_heart.y + 10, 8); |
43 |
image_angle = direction; |
44 |
image_xscale = 0.7; |
45 |
image_yscale = 0.7; |
46 |
} |
47 |
} |
48 |
if (type == 1) |
49 |
{ |
50 |
for (i = 0; i < 5; i += 1) |
51 |
{ |
52 |
bullet = instance_create(x, y, obj_collidebullet); |
53 |
bullet.sprite_index = spr_spadebullet; |
54 |
bullet.active = 1; |
55 |
bullet.offset = 18 * i; |
56 |
scr_bullet_inheritscr_bullet_inheritfunction scr_bullet_inherit(arg0)
{
if (instance_exists(arg0))
{
arg0.damage = damage;
arg0.grazepoints = grazepoints;
arg0.timepoints = timepoints;
arg0.inv = inv;
arg0.target = target;
arg0.grazed = 0;
arg0.grazetimer = 0;
}
} (bullet); |
57 |
with (bullet) |
58 |
{ |
59 |
move_towards_point(obj_heart.x + 10, obj_heart.y + 10, 4.5); |
60 |
direction = (direction - 36) + offset; |
61 |
image_angle = direction; |
62 |
image_xscale = 0.4; |
63 |
image_yscale = 0.4; |
64 |
} |
65 |
} |
66 |
} |
67 |
} |
68 |
} |
69 |
if (con == 2) |
70 |
{ |
71 |
timer += 1; |
72 |
if (timer >= 10) |
73 |
{ |
74 |
con = 4; |
75 |
timer = 0; |
76 |
} |
77 |
} |
78 |
if (con == 4) |
79 |
{ |
80 |
if (sndcon == 2) |
81 |
{ |
82 |
snd_stop(snd_swing); |
83 |
snd_play(snd_swing); |
84 |
sndcon = 3; |
85 |
} |
86 |
if (image_xscale > 0) |
87 |
{ |
88 |
image_xscale -= 0.4; |
89 |
image_yscale += 0.2; |
90 |
} |
91 |
else |
92 |
{ |
93 |
image_xscale = 0; |
94 |
con = 0; |
95 |
instance_destroy(); |
96 |
} |
97 |
} |