Module Formation_Controller

Functions for computing formations.

Functions

computeFormation (args) Computes a formation for a unit.

Local Functions

_createDerpyBattleLineFormation (bounds, count, position) Computes a list of positions to achieve a basic formation.
_create2LineFormation (bounds, count, position) Computes a list of positions to achieve a 2-by-2 formation.


Functions

computeFormation (args)
Computes a formation for a unit.

Parameters:

  • args The `name`, `bounds`, `count`, and `position` to compute.

Returns:

    A list of positions to use per mini-index.

Usage:

    computeFormation({
      -- Optional. Defaults to `2-line`.
      name = '2-line',
      bounds = {1, 1, 1},
      count = 4,
      position = {0, 0, 0},
    })

Local Functions

_createDerpyBattleLineFormation (bounds, count, position)
Computes a list of positions to achieve a basic formation.

Parameters:

  • bounds {x, y, z} size of the unit leader model.
  • count Number of miniatures total in the unit.
  • position {x, y, z} position of the unit leader model.

Returns:

    A list of positions/rotations to use per mini index.

See also:

Usage:

    For example for 2 miniatures:
        [U]
      [L]
    
    For 3:
          [U]
        [U]
      [L]
    
    For 4:
            [U]
          [U]
        [U]
      [L]
_create2LineFormation (bounds, count, position)
Computes a list of positions to achieve a 2-by-2 formation.

Parameters:

  • bounds {x, y, z} size of the unit leader model.
  • count Number of miniatures total in the unit.
  • position {x, y, z} position of the unit leader model.

Returns:

    A list of positions/rotations to use per mini index.

See also:

generated by LDoc 1.4.6 Last updated 2020-05-19 00:07:14