You give the box an instance variable, some kind of ID number. Then when it spawns the crystal you assign this ID to the crystal also as an instance variable. So box.ID=crystal.ID, they will be the same number. Then when box dies, you say pick all crystal where crystal.ID=box.ID and destroy crystal.