Hytale Asset ReferenceUnofficial
Versions / 0.6.0-pre.9 / EncounterManager / Example_Beacon_Receiver.json

Example_Beacon_Receiver

Server/EncounterManager/Example_Beacon_Receiver.json, 1.2 KB

Fields

FieldType
Classstring
Typestring
Debugstring
StartStatestring
Instructionsarray[1]

Source

{
  "Class": "EncounterManager",
  "Type": "Generic",
  "Debug": "DisplayState",
  "StartState": "Listening",
  "Instructions": [
    {
      "Instructions": [
        {
          "Sensor": { "Type": "State", "State": "Listening" },
          "Instructions": [
            {
              "Sensor": { "Type": "Beacon", "Message": "EncounterPing", "Range": 40 },
              "Actions": [
                { "Type": "Log", "Message": "[Beacon] Receiver: got EncounterPing -> Responding (1s)" },
                { "Type": "State", "State": "Responding" }
              ]
            }
          ]
        },
        {
          "Sensor": { "Type": "State", "State": "Responding" },
          "Instructions": [
            {
              "ActionsBlocking": true,
              "Actions": [
                { "Type": "Timeout", "Delay": [ 1, 1 ] },
                { "Type": "Log", "Message": "[Beacon] Receiver: response!" },
                { "Type": "SpawnParticles", "Offset": [ 0, 1.5, 0 ], "ParticleSystem": "Alerted" },
                { "Type": "PlaySound", "SoundEventId": "SFX_Test_Blip_A" },
                { "Type": "State", "State": "Listening" }
              ]
            }
          ]
        }
      ]
    }
  ]
}