Hytale Asset ReferenceUnofficial
Versions / 0.6.0-pre.8.1 / NPC / Roles / _Core / Tests / Test_Switch.json

Test_Switch

Server/NPC/Roles/_Core/Tests/Test_Switch.json, 1.2 KB

Fields

FieldType
Typestring
Appearancestring
Parametersobject
MotionControllerListarray[1]
TestTypestring
MaxHealthobject
Instructionsarray[1]
NameTranslationKeystring

Source

{
  "Type": "Generic",
  "Appearance": "Sheep",
  "Parameters": {
    "MySwitch": {
      "Value": false,
      "Description": "The on and off feature switch"
    },
    "MaxHealth": {
      "Value": 100,
      "Description": "Max health for the NPC"
    }
  },
  "MotionControllerList": [
    {
      "Type": "Walk",
      "MaxWalkSpeed": 3,
      "RunThreshold": 0.7,
      "RunThresholdRange": 0.1,
      "Gravity": 10,
      "MaxFallSpeed": 20,
      "Acceleration": 10
    }
  ],
  "TestType": "Normal",
  "MaxHealth": { "Compute": "MaxHealth" },
  "Instructions": [
    {
      "Name": "Timer",
      "Instructions": [
        {
          "Sensor": {
            "Type": "Switch",
            "Switch": { "Compute": "MySwitch" }
          },
          "Instructions": [
            {
              "Sensor": {
                "Type": "Player",
                "Range": 10,
                "LockOnTarget": true
              },
              "BodyMotion": {
                "Type": "Flee",
                "SlowDownDistance": 9,
                "StopDistance": 12,
                "RelativeSpeed": 0.65
              }
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": "server.npcRoles.Test_Switch.name"
}