lia.anim

Player model animation.

Lilia comes with support for using Player-Models, although, there are a few standard animation sets that are built-in that should cover most non-player models:

citizen_male
citizen_female
metrocop
overwatch
vortigaunt
player
zombie
fastZombie

If you find that your models are T-posing when they work elsewhere, you'll probably need to set the model class for your model with lia.anim.setModelClass in order for the correct animations to be used. If you'd like to add your own animation class, simply add to the lia.anim table with a model class name and the required animation translation table.

Functions

getModelClass(model)

Gets a model's animation class.

Parameters

  • model String

    Model to get the animation class for

Returns

  • string

    Animation class of the model

  • OR
  • nil

    If there was no animation associated with the given model

Example Usage

lia.anim.getModelClass("models/police.mdl")
 > metrocop

setModelClass(model, class)

Sets a model's animation class.

Parameters

  • model String

    Model name to set the animation class for

  • class String

    Animation class to assign to the model

Example Usage

lia.anim.setModelClass("models/police.mdl", "metrocop")

Tables

CitizenModelPaths

This table defines the default paths for citizen models in Lilia. These paths are used to determine which models should use citizen animations. You can override these settings by placing a modified version in your config folder within the schema.

Fields

  • models/humans/factory

  • models/betacz/group01

  • models/thespireroleplay/humans

  • models/suits/humans

  • models/humans/group01

  • models/humans/group02

  • models/humans/group03

  • models/humans/group03m

DefaultTposingFixer

This table defines the default model-to-animation type mappings used to fix T-posing issues in Lilia. You can override these settings by placing a modified version in your config folder within the schema.

citizen_female

This table defines the default model-to-animation type mappings used by citizen_female models.

Fields

  • normal

  • ACT_IDLE

citizen_male

This table defines the default model-to-animation type mappings used by citizen_male models.

Fields

  • normal

  • ACT_IDLE

fastZombie

This table defines the default model-to-animation type mappings used by fastZombie models.

Fields

  • [ACT_MP_STAND_IDLE]

  • [ACT_MP_CROUCH_IDLE]

  • [ACT_MP_CROUCHWALK]

  • [ACT_MP_WALK]

  • [ACT_MP_RUN]

metrocop

This table defines the default model-to-animation type mappings used by metrocop models.

Fields

  • normal

  • ACT_IDLE

overwatch

This table defines the default model-to-animation type mappings used by overwatch models.

Fields

  • normal

  • idle_unarmed

player

This table defines the default model-to-animation type mappings used by player models.

Fields

  • normal

  • [ACT_MP_CROUCH_IDLE]

  • [ACT_MP_WALK]

  • [ACT_MP_RUN]

vort

This table defines the default model-to-animation type mappings used by vortigaunt models.

Fields

  • normal

  • ACT_IDLE

zombie

This table defines the default model-to-animation type mappings used by zombie models.

Fields

  • [ACT_MP_STAND_IDLE]

  • [ACT_MP_CROUCH_IDLE]

  • [ACT_MP_CROUCHWALK]

  • [ACT_MP_WALK]

  • [ACT_MP_RUN]