Ich hab ein kleines Problem mit SpriteCollision:
Wenn ich versuche, meine Figur nach oben zu bewegen bzw. von unten nach oben.
dann bleibt Sie bei folgender Position (Y: 115) stehen und bewegt sich nicht weiter.
*siehe Bild:*

Wie kann ich die Figur so bewegen, das sie so stehen bleibt:

Code:
Code: Alles auswählen
If SpritePixelCollision(0, PlayerX, PlayerY, 2, 50, 50)
If KeyboardPushed(#PB_Key_D)
PlayerX = PlayerX-1
EndIf
If KeyboardPushed(#PB_Key_A)
PlayerX = PlayerX+1
EndIf
If KeyboardPushed(#PB_Key_S)
PlayerY = PlayerY-1
EndIf
If KeyboardPushed(#PB_Key_W)
PlayerY = PlayerY+1
EndIf
EndIf
Code inkl. Bilder:
http://www.file-upload.net/download-169 ... D.zip.html
##############################################
2. Problem
Wenn ich mit folgenden Code versuche, einen Text anzuzeigen, während ich die Rechte Maustaste klicke:
Code: Alles auswählen
If GetAsyncKeyState_(#VK_RBUTTON)
Start3D()
DisplaySprite3D(4, WindowMouseX(0)-55, WindowMouseY(0)+15)
If StartDrawing(ScreenOutput())
DrawingMode(#PB_2DDrawing_Transparent)
BackColor(RGB(0,155,155)) ; Change the text back and front colour
FrontColor(RGB(255,255,255))
DrawText(10,50,"Hello, this is a test")
StopDrawing()
EndIf
Stop3D()
Else
;Nichts
EndIf
Code: Alles auswählen
[ERROR] The specified output is NULL (0 value)