sm.character

A character is the physical body of a living entity in the world. Both players and units may control a character.

Server-only

createCharacter

sm.character.createCharacter( player, world, position, yaw, pitch, visible )

Creates a new character in a world.

Parameters:

Name Type Description
player Player The player controlling the character.
world World The world the character is created in.
position Vec3 The world position of the character.
yaw (optional) number The initial yaw of the character (Optional).
pitch (optional) number The initial pitch of the character (Optional).
visible (optional) boolean Whether the character is visible on spawn. Defaults to true. (Optional)

Returns:

Type Description
Character The created character.

Client-only

preloadRenderables

sm.character.preloadRenderables( renderables )

Pre-loads renderable data to be used by the character. This eliminates excessive loading during run time.

Parameters:

Name Type Description
renderables table The table of renderables { name = string, ... }.