If new_piece = scene.addObject(shape) makes a piece appear, why does new_piece = scene.endObject(shape) NOT make the piece disappear?
if key[bge.events.PAD5] == pressed: # If 5 key pressed target = scene.objects['Empty1'] # Find where it goes new_piece = scene.addObject(shape) # Create the piece.. new_piece.worldPosition = target.worldPosition # and place it. if key[bge.events.PAD0] == pressed: new_piece = scene.endObject(shape) # 'KX_Scene' object has no attribute 'endObject'
This is the simplest game I could make to figure this out. The entire blend file is here: https://github.com/quazipseudo/Done-Gone/blob/master/ApDisap002.blend?raw=true