Code: Select all
If KeyboardPushed(#PB_Key_A) Or KeyboardPushed(#PB_Key_Left)
Imagex= imagex-3
If SpriteCollision(0, imagex, imagey, 101, 103, 93)
imagex=imagex+3
EndIf
If SpriteCollision(0, imagex, imagey, 103, 196, 280)
imagex=imagex+3
Debug "test"
EndIf
EndIf
However, with the block as is when I try to move left at all I am prevented from moving no matter where the sprite is. Even if I am nowhere near the 196, 280 coords.
what is wrong with this code?
In retrospect this should probably be in the game programming area. If one of the mods wants to move this topic feel free to do so.