| 1 |
var random_number = irandom_range(1, 5); |
| 2 |
switch (random_number) |
| 3 |
{ |
| 4 |
case 1: |
| 5 |
feather_sprite = 2273; |
| 6 |
break; |
| 7 |
case 2: |
| 8 |
feather_sprite = 2274; |
| 9 |
break; |
| 10 |
case 3: |
| 11 |
feather_sprite = 2275; |
| 12 |
break; |
| 13 |
case 4: |
| 14 |
feather_sprite = 2276; |
| 15 |
break; |
| 16 |
case 5: |
| 17 |
feather_sprite = 2278; |
| 18 |
break; |
| 19 |
default: |
| 20 |
feather_sprite = 2273; |
| 21 |
} |
| 22 |
for (i = 0; i < fcreate_count; i += 1) |
| 23 |
{ |
| 24 |
var fcreate_x = x + (feather_radius * cos(degtorad(fcreate_angle_diff))); |
| 25 |
var fcreate_y = y - (feather_radius * sin(degtorad(fcreate_angle_diff))); |
| 26 |
global.id_store = id; |
| 27 |
instance_create(fcreate_x, fcreate_y, obj_battle_enemy_attack_martlet_feather_spiral_feather); |
| 28 |
id_feather[i] = global.id_store; |
| 29 |
with (id_feather[i]) |
| 30 |
{ |
| 31 |
sprite_index = id_target.feather_sprite; |
| 32 |
image_index = 0; |
| 33 |
image_speed = 0; |
| 34 |
image_angle = id_target.fcreate_angle_diff; |
| 35 |
trail_sprite = sprite_index; |
| 36 |
} |
| 37 |
fcreate_angle_diff -= fcreate_decrease; |
| 38 |
if (fcreate_angle_diff < 0) |
| 39 |
fcreate_angle_diff += 360; |
| 40 |
} |
| 41 |
can_spiral = true; |
| 42 |
switch (feather_sprite) |
| 43 |
{ |
| 44 |
case 2273: |
| 45 |
case 2274: |
| 46 |
case 2275: |
| 47 |
audio_play_sound(snd_mart_spiral_attack_2, 20, 0); |
| 48 |
break; |
| 49 |
case 2276: |
| 50 |
case 2278: |
| 51 |
audio_play_sound(snd_mart_spiral_attack_1, 20, 0); |
| 52 |
break; |
| 53 |
default: |
| 54 |
audio_play_sound(snd_mart_spiral_attack_1, 20, 0); |
| 55 |
} |