Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Animation sets for weapon configs. #38

@DreamyCecil

Description

@DreamyCecil

There should be specific animation sets for each weapon that you can define in weapon configs.

Animation sets for viewmodels

These animation sets will contain animation indices under certain names and fixed animation lengths.

{
  // Animation for pulling the weapon out
  "Draw" : {
    "Anim" : 1, // Animation index
    "Time" : 0.5, // Animation length in seconds
  },
  
  // Cosmetic animation that plays after some time without an attack
  "Boring" : {
    "Anim" : [6, 7], // Array of multiple animations
    "Time" : 1.0, // All animations are 1 second long
  },
  
  // Fire/swing animation
  "Attack" : {
    "Anim" : [3, 4, 5], // One of the animation indices will be picked at random
    "Time" : [0.2, 0.25, 0.3], // Each length corresponds to an animation under the same index
  },
}

Animation sets for player item models

These can just have animation indices specified for the player model, since the viewmodels' animation lengths are used when animating both the viewmodels and the player body.

{
  "Draw"    : 2, // Animation for pulling out the weapon (e.g. BODY_ANIMATION_SHOTGUN_DRAW)
  "Holster" : 3, // Animation for putting the weapon away (e.g. BODY_ANIMATION_SHOTGUN_REDRAW)
  "Idle"    : 1, // Animation for just holding the weapon
  "Attack"  : 1, // This can match the "Idle" animation for no specific attack animation
}

Utilization in weapon configs

Then they can be added to weapon configs for all kinds of models:

  "AnimSets" : {
    "Main"    : "AnimSets\01_Knife.json", // Singular weapon
    "Dual"    : "AnimSets\01_Knife.json", // While dual wielding
    "MainAlt" : "AnimSets\01_Knife.json", // Singular weapon for alt fire
    "DualAlt" : "AnimSets\01_Knife.json", // While dual wielding for alt fire
    "Player" : "AnimSets\01_Knife_Player.json", // Player model animations
  },

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions