sm.unit.createUnit

Creates a new unit of type from an Uuid

Kind: Function

Environments: Game

Game

sm.unit.createUnit( uuid, feetPos, yaw, data, pitch, visible )

Open the full Game reference

Availability: Server only

Parameters:

Name Type Description
uuid Uuid The character type uuid.
feetPos Vec3 The feet position in world where unit should spawn.
yaw (optional) number The initial yaw. Defaults to 0 (Optional)
data (optional) any The param data. (Optional)
pitch (optional) number The initial pitch. Defaults to 0 (Optional)
visible (optional) boolean Whether the unit is visible on spawn. Defaults to true. (Optional)

Returns:

Type Description
Unit The created unit.