AvernumScript/Appendix/Location and Distance Calls

Note that none of these functions are meant to be used in outdoors mode. They will not return proper values. Also, if you are writing a creature or terrain script, be sure to look up the calls my_loc_x() and my_loc_y().

UNCONFIRMED: Using ME here, or -1, from a creature script doesn't seem to work right. It gives a distance number, but does not give the distance from the creature whose script was running. I had to use the creature's number. You can do this through using the constant my_number.

Returns the distance of closest character in group which_group to the location {x,y}. Remember that group 0 is the party (in case you want to see who in the party is closest to a point). If the group is empty, the distance returned is 10000.