if (con == 0) { timer = 0; var angleoffset = irandom(360); for (var i = 0; i < bulletCount; i++) { if (i_ex(obj_dbulletcontroller)) bullet[i] = instance_create(x, y, obj_regularbullet); else bullet[i] = instance_create(x, y, obj_marker); bullet[i].direction = ((i / bulletCount) * 360) + angleoffset; bullet[i].friction = -0.05; bullet[i].sprite_index = spr_bullet_werewire_spark; bullet[i].image_speed = 0; bullet[i].image_alpha = 0; with (bullet[i]) scr_lerpvar("image_alpha", 0, 1 / other.bulletCount, other.flowerwait - 1); with (bullet[i]) scr_script_delayed(scr_var, other.flowerwait, "image_alpha", 1); bullet[i].image_xscale = 0; bullet[i].image_yscale = 0; with (bullet[i]) scr_lerpvar("image_xscale", 0, 2, other.flowerwait, 2, "out"); with (bullet[i]) scr_lerpvar("image_yscale", 0, 2, other.flowerwait, 2, "in"); if (type == 0) { with (bullet[i]) scr_script_delayed(scr_var, other.flowerwait, "speed", 0.5); scr_doom(bullet[i], 120); } } if (type == 0) instance_destroy(); con = 1; } if (con == 1) { var triggered = false; timer++; if (timer > autoexplodetime) triggered = true; var mx = mouse_x; var my = mouse_y; if (point_in_rectangle(mx, my, x - 10, y - 10, x + 10, y + 10)) triggered = true; if (collision_rectangle(x - 10, y - 10, x + 10, y + 10, obj_attack_yellow_reticle_bullet, 0, 1)) triggered = true; if (triggered == true) { for (var i = 0; i < array_length(bullet); i++) { if (i_ex(bullet[i])) { bullet[i].speed = bulspeed; bullet[i].friction = bulfrict; scr_doom(bullet[i], 120); } } instance_destroy(); } }