Acting when detecting world position I am trying to get the cube perform an action when its on a defined position but i cant make it work, i can make it show position on the console but cant get the cube to react to the code.
This is my code
import bge

def main():

    cont = bge.logic.getCurrentController()
    own = cont.owner
            
    own.applyMovement((0.2, 0, 0), True)
    
    pos = own.position
    x = pos[0]
    y = pos[1]
    z = pos[2]
    
    print(x)
    print(y)
    print(z)
    
    if (x = 10):
        own.applyMovement((0, 0, 5), True)
    

main()
Take a look to logical operators.

position is deprecated use localPosition and worldPosition.

from bge import logic
cont = logic.getCurrentController()
own = cont.owner

own.applyMovement((0.2,0,0),True)

pos = own.worldPosition
x = pos[0]
y = pos[1]
z = pos[2]

print(x)
print(y)
print(z)

if x &gt;= 10:
    own.applyMovement((0,0,5),True)