get_dist problem in Developer Help
|
|
Code:
Move() var/mob/W = src usr = src.original for(var/obj/trail/water/click/WC in world) if(WC.original == usr) world<<"NO KURWA1" var/how = get_dist(W,WC) world<<"STEP:[how]" if(get_dist(W,WC) == 0) world<<"NO KURWA2" del(W) ..()
|
Problem description:
Get_dist doesn't work if I set value to 0 if it's greater than 0 it works but not for 0, I want to del (src) when distance between src and WC is equal to 0. How can I do it?
|
Second, get_dist() records how many steps it takes to get from A to B. get_dist() will not return 0 unless A and B are in the same location. If what you're trying to detect is if A and B are within touching-range, you'll want to see if the get_dist() between them is 1.