Hytale Asset ReferenceUnofficial
Versions / 0.6.0-pre.2 / NPC / Roles / _Core / Tests / Test_Weather_Sensor.json

Test_Weather_Sensor

Server/NPC/Roles/_Core/Tests/Test_Weather_Sensor.json, 1.4 KB

Fields

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

Source

{
  "DefaultSubState": "Start",
  "Type": "Generic",
  "Appearance": "Sheep",
  "MotionControllerList": [
    {
      "Type": "Walk",
      "MaxWalkSpeed": 3,
      "RunThreshold": 0.7,
      "RunThresholdRange": 0.1,
      "Gravity": 10,
      "MaxFallSpeed": 20,
      "Acceleration": 10
    }
  ],
  "TestType": "Normal",
  "MaxHealth": { "Compute": "MaxHealth" },
  "Parameters": {
    "MaxHealth": {
      "Value": 100,
      "Description": "Max health for the NPC"
    }
  },
  "Instructions": [
    {
      "Instructions": [
        {
          "Sensor": {
            "Type": "Weather",
            "Weathers": [ "*Rain*" ]
          },
          "Instructions": [
            {
              "Continue": true,
              "Sensor": {
                "Type": "Any"
              },
              "Actions": [
                {
                  "Type": "DisplayName",
                  "DisplayName": "Raining"
                }
              ]
            },
            {
              "Sensor": {
                "Type": "Any"
              },
              "BodyMotion": {
                "Type": "Wander"
              }
            }
          ]
        },
        {
          "Sensor": {
            "Type": "Any"
          },
          "Actions": [
            {
              "Type": "DisplayName",
              "DisplayName": "Not raining"
            }
          ]
        }
      ]
    }
  ],
  "NameTranslationKey": "server.npcRoles.Test_Weather_Sensor.name"
}