Table of Contents

Class EntityBehaviorGait

Namespace
Vintagestory.GameContent
Assembly
VSEssentials.dll

Allows to define gaits of an entity.
Uses the "gait" code Open in GitHub

[DocumentAsJson]
[AddDocumentationProperty("gaits", "List of gaits in order of increasing speed for the rideable entity", "Vintagestory.GameContent.GaitMeta[]", "Required", "", false)]
[AddDocumentationProperty("idleGait", "The code of idle gait used when no other gait is triggered", "System.String", "Required", "idle", false)]
public class EntityBehaviorGait : EntityBehavior
Inheritance
EntityBehaviorGait

Examples

"behaviors": [
  {
    "code": "gait",
    "idleGait": "idle",
    "gaits": [
      {
          "code": "walkback",
          "movespeed": 0.011,
          "backwards": true,
          "yawMultiplier": 1,
          "sound": "game:creature/hooved/trot"
      },
      {
          "code": "idle",
          "yawMultiplier": 1
      },
      {
          "code": "walk",
          "movespeed": 0.019,
          "yawMultiplier": 1,
          "sound": "game:creature/hooved/trot"
      },
      {
          "code": "trot",
          "movespeed": 0.036,
          "yawMultiplier": 0.85,
          "fallbackGaitCode": "walk",
          "sound": "game:creature/hooved/trot"
      },
      {
          "code": "canter",
          "movespeed": 0.075,
          "yawMultiplier": 0.75,
          "fallbackGaitCode": "trot",
          "sound": "game:creature/hooved/trot"
      },
      {
          "code": "sprint",
          "movespeed": 0.1067,
          "yawMultiplier": 1,
          "isSprint": true,
          "fallbackGaitCode": "walk",
          "sound": "game:creature/hooved/gallop"
      },
      {
          "code": "swim",
          "movespeed": 0.02,
          "yawMultiplier": 1,
          "fallbackGaitCode": "idle",
          "sound": "game:creature/hooved/gallop"
      },
      {
          "code": "swimback",
          "movespeed": 0.02,
          "backwards": true,
          "yawMultiplier": 1,
          "fallbackGaitCode": "idle",
          "sound": "game:creature/hooved/gallop"
      },
      {
          "code": "jump",
          "movespeed": 0.1067,
          "yawMultiplier": 1,
          "fallbackGaitCode": "walk",
          "sound": "game:creature/hooved/gallop"
      }
    ]
  }
]

Fields

gaits (Required)

List of gaits in order of increasing speed for the rideable entity

Field Value

GaitMeta[]

idleGait (Required) (Default: idle)

The code of idle gait used when no other gait is triggered

Field Value

String