Use the Distance Formula - the distance between two objects is Sqrt((X2-X1)^2 + (Y2-Y1)^2). At least, I hope it is, because I realized that I had completely forgotten it when I hit Reply.
There is no extension for tgf/cnc that could calculate the distance directly. I have tried to do this with advantech math object like this, but it did'nt work..?
Allways: set counter to:
Sqrt( "Advanced Math object 2", ( X( "Player hitbox" ) - X( "sound creator 1" )) Pow( "Advanced Math object 2", 2 ) + ( Y( "Player hitbox" ) - Y( "sound creator 1" )) Pow( "Advanced Math object 2", 2 ) )
Oh there is "Distance from fixed object to x,y" but i cant define position of the other object.. only thing i can define is just one number ---> FixedDist( "Advanced Math object 2", 0 ). What's that supposed to mean? And if i put it like that i get syntax error.
Isn't there one for "Distance from 0,0 to x,y" aswell?
Just use:
Dist("Advanced Math object", X("Object 1") - X("Object 2"), Y("Object 1") - Y("Object 2"))