SPRITE(D ,[#]s1, [#]s2)

Returns the distance between the centres of sprites s1 and s2 (returns -1 if either sprite is not active)