Not = positions on tilemap?

BlitzMax Forums/BlitzMax Beginners Area/Not = positions on tilemap?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hi! In my game I have magnets which draw the player closer to them if the player is on the same position as them.

I currently iterate through each magnet on screen with a loop but want to detect when the player isn't on any magnet at all.

Example psuedo code

For Local MagnetIter = 0 To Number Of Magnets
     If PlayerY is > MagnetYPos[MagnetIter] - 32 And < MagnetYpos[MagnetIter] 
	 	DragPlayer = 1
	Else
		DragPlayer = 0
	EndIf
Next

If DragPlayer = 1
	Move Player closer To magnet
ElseIf DragPlayer = 0
	Do nothing And keep player at position
End If


The problem I'm having is that if the player is not on 1 magnet position DragPlayer will = 0. So if I had 2 magnets stacked on top of eachother if the player is not on one of them DragPlayer will = 0.

So, how would I go about checking if the player isn't on any magnets at all so that i can reset the movement?

I hope this made sense. :)