Display multiple instances of an object and delete only the one involved in collision

I am creating the following object orgMonst, when it’s hit in a collision the object is destroyed and recreated with the same name with different image and physics but I want to create more than one orgMonst in the beginning (random number) and once the collision happens delete only the one involved in it.
Here is the code for the original object, the collision function and the function to swap the object upon collision

[lua]–CREATE MONSTER
local physicsData = (require “gamePhysics”).physicsData(0.333)
enemy = display.newImage(“monst2.png”)
enemy.x = 250 enemy.y = 200
physics.addBody(enemy, physicsData:get(“2bMonst”))
enemy.myName = “enemy”
enemy.bodyType = “static”
enemy.isFixedRotation = true

local swapEnem = function()
physicsData = (require “gamePhysics”).physicsData(0.333)
enemy = display.newImage(“monst1.png”)
enemy.x = tempX enemy.y = tempY
physics.addBody(enemy, physicsData:get(“1bMonst”))
enemy.myName = “newEnem”
enemy.bodyType = “static”
enemy.isFixedRotation = true
print (“ORIGINAL MONSTER REMOVED NEW ONE CREATED WITH SAME OBJECT NAME: enemy”)
end

local function playerCollision( self, event )
– player hits and removes enemy
if ( self.myName == “player” and event.other.myName == “enemy” ) then
if (( event.selfElement == 3 and event.otherElement == 1 ) or ( event.selfElement == 3 and event.otherElement == 2 )) then
tempX = enemy.x; tempY = enemy.y
enemy:removeSelf()
timer.performWithDelay(33, swapEnem, 1)
end
end
end [import]uid: 43696 topic_id: 10665 reply_id: 310665[/import]

Here is the code for my vanishing blocks as seen in http://www.facebook.com/video/video.php?v=217092918308481&oid=212102442146352&comments

[code]local function vanishing( self, event )
if ( event.phase == “began” ) and self.poof ~=1 then
print(“Vanish Function Started”)
self.poof = 1
self.stopafteronce =2
transition.to( self, { alpha=0, time500 } )
local doCollision = function()
self.y = self.y +2000
print(“Block is gone”)

local function doCollision2( )
if dead == 2 and self.stopafteronce == 2 then
print(“Block is back”)

self.stopafteronce = 1
Runtime:removeEventListener(“enterFrame”, doCollision2)
transition.to( self, { alpha=1, time300 } )
self.y = self.y - 2000
self.poof = nil
end

end

Runtime:addEventListener(“enterFrame”, doCollision2)

end

local collisionTimer = timer.performWithDelay( 500, doCollision, 1 )
end
end

– adds the blocks from tiled
function onVanish (property, type, object)
local Vanish = object.sprite
Vanish.collision = vanishing
Vanish:addEventListener( “collision”, Vanish )
end[/code]
The onVanish is called from localGroup.map:addPropertyListener(“IsVanish”, onVanish) which is a lime thing that should not apply to what you have, but you could call them for your random objects i am sure.

the function then uses self to vanish just one block when you touch it, then waits for the player to die to respawn all the blocks [import]uid: 39391 topic_id: 10665 reply_id: 38863[/import]