This something i use in debug mode to judge how far an opponent is, its also very useful for when your doing the AI too. Put the coding under statedef -2. Code:
[State -2, DTC]
type = DisplayToClipboard
trigger1 = 1
text = "P2BodyDist X = %d, P2BodyDist Y = %d, Frontedgedist = %d, Backedgedist = %d"
params = Floor(P2BodyDist X), Floor(P2BodyDist Y), frontedgedist, backedgedist
IgnoreHitPause = 1
You should be able to see more information when you use debug mode (Ctrl + D).
Heres an example of what it looks like: