Appearance
Class/Actor Commands
Set Class
- Method:
player.setClass(ClassClass)
- Arguments:
- {
ClassClass | string
}class
. class or id (Optional:false
)
- {
- Return:
instance of ClassClass
- Usage:
Assign a class to the player
ts
import { Fighter } from 'my-database/classes/fighter'
player.setClass(Fighter)
Set Actor
- Method:
player.setActor(ActorClass)
- Arguments:
- {
ActorClass | string
}actorClass
. actor class or id (Optional:false
)
- {
- Return:
instance of ActorClass
- Usage:
Allows to give a set of already defined properties to the player (default equipment, or a list of skills to learn according to the level)
ts
import { Hero } from 'my-database/classes/hero'
player.setActor(Hero)