Thanks EvilSOB, you nailled it! That extra /16 for the pan (and *16 for the cycle) is what was missing from the formula.

and I learned a new engine function! No more ugly %= for me!
(well that depends... which is faster? %= or cycle?)

Last edited by Carlos3DGS; 01/11/12 15:02.

"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1