Index

SetLegalUnitCells

SetLegalUnitCells(<-listOfCells <-val)

Description

Sets a list of Vector2 (V2) map locations that are the only legal places for the player to build or move units. The list must contain vector2 items consisting of the X/Z postion on the map that is legal. Note that the entire footprint of the unit being built/moved must be over a legal build cell. So if a 3×3 unit is to be placed, there must be a 3×3 legal area (9 cells) that are legal. Set 'val' to true to allow a unit to be built/moved and to false to disallow the unit from building/moving to that location.
Note: You must call UseLegalUnitCells(true) for legal cells to be used.

Examples

List(V2(10 10) V2(11 10) V2(12 10) V2(10 11) V2(11 11) V2(12 11) V2(10 12) V2(11 12) V2(12 12)) ->cells
SetLegalUnitCells(<-cells true)

Index