Replace objects with a group of objects using Python I know how to add an object from another layer into main scene, but how can I do it for a group of objects:
Here's my blend file
https://www.dropbox.com/s/41o9arxmbohsva7/temp.blend?dl=0

What I am trying to do is that as soon as the cubes collide (controls are UP/DOWN/LEFT/RIGHT), I want the original cube to be removed(which already works) and replaced with the group of objects from layer 2 (brokenCube).
The brokenCube is created using cell fracture.

To sum it up, I need to replace Object cube with group brokenCube on collision with player object 

EDIT: Here's the new blend where I was trying to implement the idea. It's slightly complicated, but the building should break when the dragon hits it. (Which it will, just don't press any keyboard buttons)

The endObject() seems to be working, but the added object's does not show up at the correct location and defaults to the player_location. (instead of using the collision calling object)

https://www.dropbox.com/s/2guepbfyq6h4tsm/dragon.blend?dl=0
If you create an empty, and set it to represent an instance of the brokenCube group (Properties panel -> Object -> Duplication -> Group), you can then simply add that empty, to add all the objects in the group.

Demo: break_demo.blend

PS: Cell fracture seems to create areas with a very large number of very small parts. I would recommend that you remove most of them (as I did in the demo), if you want to have good performance.