cast melee only during your turn and only during combat before blockers are declared.
you choose which creatures block this combat and how those creatures block.
whenever a creature attacks and isn't blocked this combat, untap it and remove it from combat.