The Balakanda of Ramayana has a different version, though Karthikeya in his role of Army-General killed Taraka. According to it. Gods wanted Siva to preserve his energy for denavasamhara. though Siva applauded the request, he admitted that he had already discharged his seed.
Gods then requested the Earth. Agni and Vayu to receive the seed and enter it. Agni at once entered the seed which turned into a white mountain from which Karthikeya was born. He was the aspect of Siva and so inherited invincibility that destroyed the Asurakula.