quick question

Blitz3D Forums/Blitz3D Beginners Area/quick question

update: partially fixed it, it was the using of mousehit(1) in place of mousedown(1). However, using mousedown causes problems with dragging an item over another item makes you pick that up too. This is fixed with utilizing the hold variable. Now, for completely other reasons, dragging one of two items to another slot (not going over the other) causes both to move. code:

For item.genericitem = Each genericitem
			If hold = False Then 
				Select item\slot 
					Case 1
						If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)-159, (displayheight/2)-233, 160, 160) And MouseDown(1) Then hold = True
					Case 2
						If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)+1, (displayheight/2)-233, 160, 160) And MouseDown(1) Then hold = True
					Case 3
						If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)-159, (displayheight/2)-73, 160, 160) And MouseDown(1) Then hold = True
					Case 4
						If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)+1, (displayheight/2)-73, 160, 160) And MouseDown(1) Then hold = True
					Case 5
						If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)-159, (displayheight/2)+87, 160, 160) And MouseDown(1) Then hold = True 
					Case 6
						If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)+1, (displayheight/2)+87, 160, 160) And MouseDown(1) Then hold = True
				End Select
			EndIf 
			If hold = True Then
				item\held = True
			EndIf
			If item\held = True Then
				DrawImage item\image, MouseX(), MouseY()
				If Not MouseDown(1) Then
					item\held = False
					hold = False 
					If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)-159, (displayheight/2)-233, 160, 160) Then item\slot = 1
					If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)+1, (displayheight/2)-233, 160, 160) Then  item\slot = 2
					If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)-159, (displayheight/2)-73, 160, 160) Then item\slot = 3
					If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)+1, (displayheight/2)-73, 160, 160) Then item\slot = 4
					If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)-159, (displayheight/2)+87, 160, 160) Then item\slot = 5
					If RectsOverlap (MouseX(), MouseY(), 1, 1, (displaywidth/2)+1, (displayheight/2)+87, 160, 160) Then item\slot = 6
				EndIf
			EndIf
		Next