with (obj_green_enemy) { x = other.x; y = other.y; } var timermax = 12; var location_i = choose(0, 1, 2); var location_x = 0; var location_count = 3; if (i_ex(obj_orange_green_controller)) { if (obj_orange_green_controller.powerup == 1) timermax = 13; if (obj_orange_green_controller.powerup == 2) timermax = 10; if (obj_orange_green_controller.powerup == 3) timermax = 6; if (obj_orange_green_controller.powerup == 4) timermax = 8; if (obj_orange_green_controller.powerup >= 5) timermax = 10; repeat (location_count) { if (obj_orange_green_controller.powerup == 0 && location_i == savelasti) location_i++; if (location_i > (location_count - 1)) location_i = 0; } savelasti2 = savelasti; savelasti = location_i; location_x = landingspot_x[location_i]; } timer++; if (timer == (timermax - 3)) image_index = 0; if (timer >= timermax) { image_index = 1; timer = 0; mode2count++; if ((mode2count % 3) == 0 && obj_orange_green_controller.powerup != 5) { candy = instance_create(x - 48, (y + 46) - 10, obj_regularbullet); candy.sprite_index = spr_bullet_green_flame; candy.image_speed = 0.25; candy.depth = depth - 100; candy.image_xscale = 2; candy.image_yscale = 2; candy.gravity = 0.35; candy.target = 4; candy.damage = 96; with (candy) scr_lerpvar("x", x, location_x, 15, 2, "out"); with (candy) scr_lerpvar("y", y, cameray() + 30 + random_range(-10, 10), 10, 2, "out"); if (i_ex(obj_orange_green_controller) && obj_orange_green_controller.powerup >= 1 && mode == 2) candy.gravity = choose(0.35, 0.45, 0.25); if (i_ex(obj_orange_green_controller) && obj_orange_green_controller.powerup >= 3) candy.gravity = 0.35; if (obj_orange_green_controller.powerup == 2) mode2count -= irandom(1); } else { if (obj_orange_green_controller.powerup == 1) { sharewithorange_counter++; if (sharewithorange_counter == 1) foodtype = 1; if (sharewithorange_counter >= 2) { foodtype = 0; sharewithorange_counter = 0; } } if (obj_orange_green_controller.powerup == 2) foodtype = 2; if (obj_orange_green_controller.powerup == 3) foodtype = 0; if (obj_orange_green_controller.powerup == 4) foodtype = 2; if (obj_orange_green_controller.powerup >= 5) { sharewithorange_counter++; if (sharewithorange_counter == 1) foodtype = 1; if (sharewithorange_counter == 2) { foodtype = 0; sharewithorange_counter = 0; } } if (foodtype == 0) { candy = instance_create(x - 48, (y + 46) - 10, obj_bullet_healing); candy.sprite_index = spr_bullet_green_egg; candy.image_speed = 0.25; candy.image_blend = hexcolor(c_lime); candy.depth = depth - 100; candy.gravity = 0.35; with (candy) scr_lerpvar("x", x, location_x + 18, 15, 2, "out"); with (candy) scr_lerpvar("y", y, cameray() + 30 + random_range(-10, 10), 10, 2, "out"); if (i_ex(obj_orange_green_controller) && obj_orange_green_controller.powerup >= 1 && mode == 1) candy.gravity = choose(0.35, 0.35, 0.1); if (i_ex(obj_orange_green_controller) && obj_orange_green_controller.powerup >= 3) candy.gravity = 0.35; candy.con = location_i; } if (foodtype == 1) { candy = instance_create(x - 48, (y + 46) - 10, obj_bullet_healing); candy.sprite_index = spr_donut_bullet; candy.image_blend = hexcolor(c_lime); candy.depth = depth - 100; candy.image_xscale = 1; candy.image_yscale = 1; candy.vspeed = -14 - random(6); } if (foodtype == 2) { candy = instance_create(x - 48, (y + 46) - 10, obj_bullet_healing); candy.sprite_index = spr_swatchling_platter_candy; candy.image_blend = hexcolor(c_lime); candy.depth = depth - 100; candy.image_xscale = 1; candy.image_yscale = 1; if (con == 0) { location_x = ((obj_growtangle.x + 12) - (obj_growtangle.sprite_width * 0.5)) + irandom(25); con = 1; } else { location_x = (obj_growtangle.x + (obj_growtangle.sprite_width * 0.5)) - 10 - irandom(25); con = 0; } with (candy) scr_lerpvar("x", x, location_x, 10, 2, "out"); with (candy) scr_lerpvar("y", y, cameray() + 40, 10, 2, "out"); timer = -2; } } if (foodtype == 0) scr_doom(candy, 80); } draw_self(); if (timer >= lifetime || global.turntimer < 1) instance_destroy();