sm.character
Associated object type: Character
A character is the physical body of a living entity in the world. Both players and units may control a character.
Functions:
sm.character.createCharacter(player, world, position, yaw=nil, pitch=nil)
Server only
Creates a new character in a world.
Parameters:
| Type | Name | Description |
|---|---|---|
| Player | player | The player controlling the character. |
| World | world | The world the character is created in. |
| Vec3 | position | The world position of the character. |
| number | yaw=nil | The initial yaw of the character (Optional). |
| number | pitch=nil | The initial pitch of the character (Optional). |
Returns:
| Type | Description |
|---|---|
| Character | The created character. |
sm.character.preloadRenderables(renderables)
Client only
Pre-loads renderable data to be used by the character. This eliminates excessive loading during run time.
Parameters:
| Type | Name | Description |
|---|---|---|
| table | renderables | The table of renderables { name = string, ... }. |