Skip to main content

Character

Instance of Entity. All Living functions are available as well.

Character functions are accessible to all entities, but will throw if the entity is not a Character or Player.

Character.from(entity)

Returns the entity passed in if the entity is a character or player, otherwise returns nil.

Character.from_package(package_id, team, rank)

  • package_id: string, the package id of the character
  • team: Team
  • rank
    • Rank.V1
    • Rank.V2
    • Rank.V3
    • Rank.V4
    • Rank.V5
    • Rank.SP
    • Rank.EX
    • Rank.Rare1
    • Rank.Rare2
    • Rank.NM
    • Rank.RV
    • Rank.DS
    • Rank.Alpha
    • Rank.Beta
    • Rank.Omega
    • Rank.Sigma

Returns a new Entity, throws if the package doesn't exist.

Character:rank()

Returns the character's rank.

Character:field_cards()

Returns a list of CardProperties, the first card is the next card that can be used.

Character:field_card(index)

  • index: number, 1 represents the next card that can be used.

Returns CardProperties or nil.

Character:set_field_card(index, card_properties)

  • index: number, 1 represents the next card that can be used.
  • card_properties: CardProperties

Changing package_id will cause card_mutate() to restart or run again next frame.

If there's no card at this index, nothing happens.

Character:remove_field_card(index)

  • index: number, 1 represents the next card that can be used.

Character:insert_field_card(index, card_properties)

  • index: number, 1 represents the next card that can be used.
  • card_properties: CardProperties

Inserts a card at this index, shifting cards at this position and after to the right.

Will cause card_mutate() to restart or run again next frame.