Action On Speak (Power Type)

Runs an action when the holder starts or stops talking in voice chat.

Runs an Entity Action when the holder starts talking into voice chat, and another when they stop.

Type ID: apoli:action_on_speak

Fields

FieldTypeDefaultPurpose
entity_actionEntity ActionoptionalRun once when the holder starts speaking.
entity_action_stopEntity ActionoptionalRun once when the holder stops speaking, after roughly 0.4 s of silence.

Examples

Glow while talking:

{
  "type": "apoli:action_on_speak",
  "entity_action": {
    "type": "apoli:grant_power",
    "power": "example:talking_glow",
    "source": "example:speaking"
  },
  "entity_action_stop": {
    "type": "apoli:revoke_power",
    "power": "example:talking_glow",
    "source": "example:speaking"
  }
}

Shockwave, but only when shouting and only when somebody is close enough to hear:

{
  "type": "apoli:action_on_speak",
  "condition": {
    "type": "apoli:and",
    "conditions": [
      { "type": "apoli:voice_loudness", "comparison": ">=", "compare_to": 70 },
      { "type": "apoli:voice_listeners", "range": 8.0 }
    ]
  },
  "entity_action": {
    "type": "apoli:area_of_effect",
    "radius": 6.0,
    "bientity_action": { "type": "apoli:damage", "amount": 4.0 }
  }
}