Skip to content
On this page

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

import { Fighter } from 'my-database/classes/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)

import { Hero } from 'my-database/classes/hero'