Nextsectorneighborz

From EDukeWiki
Jump to navigation Jump to search

nextsectorneighborz <starting sector> <starting z> <ceiling or floor (-1 or 1)> <up or down (-1 or 1)>

Finds the nearest sector to <starting sector> based on z position by searching for a <ceiling or floor> from the <starting z>, and scanning <up or down>. Note: The only valid values for the last two parameters are -1 or 1.

RETURN will be the sectnum found. If RETURN is -1, then nothing was found by the search.