How get object possition after action in Blender_Game I have big problem with python scripts in the game engine. I have a cube with an action in the X axis. Another cube which after clicked with mouse, starts a script.

button=bpy.data.objects['buttonLogic1'].location
print('button[0]')


But this gives me back only the location before action, and not after the action.
Bpy does not work in the game engine. Instead you have to use the game engine modules

For this particluar application, your script could look something like:

import bge

cont = bge.logic.getCurrentController()
own = cont.owner
scene = own.scene
button = scene.objects['buttonLogic1']
print(own.worldPosition)


The standalone modules are also available in the game engine.