how to handel 2D collsion like a rpg game ?
I use this
If ImagesCollide(sprite1,x%,y%,a%,berg1,200,200,0)
but than the moving object is hanging in a tree.
I thought mmm then I change the x and y -1 or +1 but that's not working because you can walk arround the tree.
There is no function to reset the Collision.
I use this
If ImagesCollide(sprite1,x%,y%,a%,berg1,200,200,0)
but than the moving object is hanging in a tree.
I thought mmm then I change the x and y -1 or +1 but that's not working because you can walk arround the tree.
There is no function to reset the Collision.
;some code here wend ;some code here Collide() ;move If KeyDown(205) Then ;right x%=x%+1 a%=3 End If If KeyDown(203) Then ;left x%=x%-1 a%=9 End If If KeyDown(200) Then ;up y%=y%-1 a%=0 End If If KeyDown(208) Then ;down y%=y%+1 a%=6 End If DrawImage sprite1,x%,y%,(sprite1_frm+a%) a% = "" ;idle Flip Wend End Function Collide() If ImagesCollide(sprite1,x%,y%,a%,berg1,200,200,0) Then Text 250,250,"Now i Stop walking :) and i can't move again stuck in a tree" ;But I want to walk again EndIf End Function