Module Spawn_Controller

Funtions for spawning miniatures.

Functions

spawnUnit (args) Creates a unit using the provided table.
spawnSilouhette (args) Spawns a silouhette at the provided position and rotation.

Tables

_BASE_SIZE_TO_COLLIDER References what collider to use for various base sizes.


Functions

spawnUnit (args)
Creates a unit using the provided table.

Parameters:

  • args A table referring to the unit to spawn.

Returns:

    Handle to the spawned unit leader

Usage:

    spawnUnit({
      -- Unit data retrieved from the data controller.
      data = { },
    
      -- Color the unit belongs to.
      color = 'Red',
    
      -- Vector.
      position = {0, 0, 0},
    
      -- Vector. Optional, defaults to {0, 0, 0}.
      rotation = {0, 0, 0},
    
      -- Formation. Optional, defaults to '2-line'.
      formation = '2-line',
    })
spawnSilouhette (args)
Spawns a silouhette at the provided position and rotation.

Parameters:

  • args The `position` and `rotation` to use.

Returns:

    Handle to the spawned silouhette.

Usage:

    spawnSilouhette({
      position = {0, 0, 0},
      rotation = {0, 0, 0},
    })

Tables

_BASE_SIZE_TO_COLLIDER
References what collider to use for various base sizes.

Fields:

  • Small
  • Medium
  • Large
  • Huge
  • Gigantic
generated by LDoc 1.4.6 Last updated 2020-05-19 00:07:14