I think Jim and AL are correct you need to check the Y values of menuShapes. I took out your conditional check and it exited after x# was greater then 20
here's the code I used in FE
menuGo = createsprite(0)
x# = 0
setspritephysicson(menuGo,2)
setspriteposition(menuGo,0,90)
setSpritePhysicsVelocity(menuGo, 70, 0)
while x# < 20.0
x# = getSpriteXbyOffset(menuGo)
setprintcolor(255,255,255)
print("I'm in the loop and stuck")
print(x#)
sync()
endWhile
do
print("exited x# = ")
print(x#)
sync()
loop
Maybe FE is is doing something strange to the Y values of menuShapes ?
[edit]
I used your original code and put a couple dummy sprites in that met your conditional checks and it seems to work fine.
Change the Y value of menuShapes to anything greater then 10 and it'll never exit the while loop
Code for FE again
menuGo = createsprite(0)
SetspritePhysicsOn(menuGo,2)
menuShapes = createsprite(0)
SetSpritePosition(menuShapes,0,2)
x# = 0
while x# < 20.0
if getSpriteYbyOffset(menuShapes) > 0 and getSpriteYbyOffset(menuShapes) < 10
setSpritePhysicsVelocity(menuGo, 70, 0)
endIf
x# = getSpriteXbyOffset(menuGo)
setprintcolor(255,255,255)
print("I'm in the loop and stuck")
sync()
endWhile
do
print(x#)
sync()
loop
Auger