So object 1, the Plane, is supposed to get half of Plane2’s X location. It doesn’t work though. Why not? I have a motion actuator set up on Plane2, but when i try a print obj2.LocX it always returns the plane’s original location.
-This kind of script doesn’t work in Game Engine.
You must use the GameLogic module instead.So if
you want an object to get the half X position of another
in Game Engine must do:
where a Sphere get the new position.The Python Controller
with the script must be connected with an Actuator named “act”
of the Cube.So you have these bricks:
Sensor of the Sphere – Python Controller of the Sphere –
Actuator of the Cube.