# CellinRange 2021/06/26 # Return a list of cells given a midpoint and a radius. 115 ->x 54 ->z 20 ->radius CreateList ->cells # will contain list of cells in range of call Do (<-x <-radius 1 + +, <-x <-radius -) #x #J Do (<-z <-radius 1 + +, <-z <-radius -) #z #I If (DistanceCell(<-x <-z J I) LTE (<-radius 0.66 +)) If (IsV2InMap (V2(J I))) FC(J I) #push to stack EndIf EndIf Loop Loop AppendStackToList (<-cells) # populate list @CellOut #replace this with a routine to do what you desire. #--------- :CellOut # set up theme overlay V4(1 1 0 1) List ->yellow V4(0 1 0 1) list ->green CreateThemeOverlay(0 GetMapSize Vector0) SetThemeOverlayEnabled(0 true) SetThemeOverlayPointFilter(0 true) # do the real work Do (GetListCount(<-cells) 0) SetThemeOverlayPixels(0, UFC(<-cells[i]),, 1, 1, <-green) Loop