Skip to main content

CharacterManager

The CharacterManager holds all the Character classes in the game.

characters: Object

The characters object is the main list of characters. You can query it by using getCharacter. You can add to the list by using addCharacter.

getCharacter(id): Character

Returns the given Character.

QB.character.getCharacter("Queen")
QB.character.getCharacter("Suki").setNaked(true)

id: String

ID of the character.

addCharacter(path)

Add a character to the characters object.

QB.character.addCharacter("res://character/Queen.gd")
# Or, if the script is in the res://character/ folder, you can shorten this to:
QB.character.addCharacter("Queen")

path: String

The path to the Character script. For best practice, put characters in the res://character/ folder. If you use the res://character/ folder you can provide only the ID of the character when calling the addCharacter function.

getAssets(id, outfitID?): Array<String>

Returns an array of strings. These are all the image assets needed to display the character on the screen. By default, it will query the character's current outfit, but you can provide an outfit ID if you want to query a different outfit.

# Get Queen's current outfit
QB.character.getAssets("Queen")
# Get Suki's Cheerleader outfit
QB.character.getAssets("Suki", "Cheerleader")

id: String

ID of the character.

outfitID: String

ID of the outfit. Leave this parameter blank if you want query the currently equipped outfit.

getUnlockedGirls(): Array<String>

Returns an array of strings, character IDs. This function will query the main characters to see which ones are unlocked.

if QB.character.getUnlockedGirls().has("Suki"):
QB.character.getCharacter("Suki").cumOn("face")