Distance between images?

Blitz3D Forums/Blitz3D Beginners Area/Distance between images?

Apollonius(Posted 2003) [#1]
In a rpg how can u find out distance between u and another person... Image to Image?


Ross C(Posted 2003) [#2]
Is it a isometric or side on? I would probably use grid spaces, ie. the ones the map tiles use, and figure out the distance from one to another (using the distance equation)

distance= SquareRoot( x*x + y*y)



ford escort(Posted 2003) [#3]
it depend, what you really want

this function return the distance beetween 2 coordinates
Function calcdist#(x1#,y1#,x2#,y2#)
	distx#=Abs(x1#-x2#)
	disty#=Abs(y1#-y2#)
	Return Sqr((distx#*distx#)+(disty#*disty#))
End Function