(AGK version: 2.0.16)
Submitted: 2017-01-11 13:59:50

// set window properties
SetWindowTitle( "2D_getdistance" )
SetWindowSize( 1024, 768, 0 )
SetVirtualResolution( 1024, 768 )

Spr1 = CreateSprite(0)
Spr2 = CreateSprite(0) : SetSpriteColor(spr2,255,0,0,255)
SetSpritePosition(spr1,random(0,1024),random(0,768))
SetSpritePosition(spr2,random(0,1024),random(0,768))

do
    

    Print(ScreenFPS() )
    Print(GetSpriteDistance(Spr1, Spr2 ))
    Sync()
loop
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.