Class Outfit

This is used for setting player & bot body colors + assets.

To replicate the changes, use the setOutfit and setOutfit method(s).

Example

const outfit = new Outfit()
// Sets body colors to white
.body('#ffffff')
// Change head color (body colors are still changed!)
.head('#000000')

Game.on('playerJoin', (p) => {
p.on('avatarLoaded', () => {
// Apply the outfit to the player
p.setOutfit(outfit)
})
})

Hierarchy

  • Outfit

Constructors

Properties

_idString: Set<string>
assets: Partial<Assets>
colors: Partial<BodyColors>

Accessors

Methods

  • Sets the player's clothing1 to the asset id specified.

    Parameters

    • clothingid: number

    Returns Outfit