<- CRPL reference <- Unit Commands

SetCellOccupiedCount

Arguments Result Notation
X,Y,CountNonex1 y1 c1 -

Description

Sets the occupied count for a map cell. Extreme caution must be exercised when using this command. Normally units will increase the count for cells they occupy when they land or are created. The units will also decrease the count by 1 whenever they take off or are destroyed. Messing with the count can create 'phantom' areas on the map where units can't land or where they can stack. Units do not know that you have altered the count! So if you change the occupied count, a unit will still decrease the count by 1 when it takes off or is destroyed

#Make an area on the map that nothing can land in.
once
   20 10 do
      20 10 do
         SetCellOccupiedCount(I J 10000)
      loop
   loop
endonce


#Make an area on the map always have a count of 0.  This means units can stack on top of each other in this area.
10 0 do
   10 0 do
      SetCellOccupiedCount(I J 0)
   loop
loop