Module Play_Area
Represents the active table.
Functions
| resize (size) | Clears and then resizes the table to provided {width, height}. |
| getAllUnitLeaders () | Returns all unit leaders that are currently in the play area. |
| getAllTargets () | Returns all targetable units that are currently in the play area. |
Local Functions
| clearTable () | If there is a visible play area, destroys it. |
| createZone (width, height) | Creates a new scripting zone on top of the table to watch for minis. |
Functions
- resize (size)
-
Clears and then resizes the table to provided {width, height}.
If {0, 0} is passed in the table is cleared/destroyed only.
Parameters:
- size A table of an X and Y value, in inches.
Usage:
playArea.call('resize', {36, 36})
- getAllUnitLeaders ()
-
Returns all unit leaders that are currently in the play area.
Usage:
local unitLeaders = playArea.call('getAllUnitLeaders') for _, unitLeader in ipairs(unitLeaders) do -- ... end
- getAllTargets ()
-
Returns all targetable units that are currently in the play area.
In practice, this is all unit leaders plus all non-unit leader minis.
Usage:
local targets = playArea.call('getAllTargets') for _, target in ipairs(targets) do -- ... end