Origins: Powerful Powers
» Entity actions » Action on signal

Action on signal

origins-powerful-powers:action_on_signalpower type

Runs actions when the holder hears a signal it listens for. Any living entity can hold it.

FieldTypeDefaultDescription
signalsArray of StringsrequiredThe names to listen for. * matches any run of characters: mypack:*, *:alarm, or * for everything.
entity_actionEntity actionoptionalRuns on the listener.
bientity_actionBi-entity actionoptionalActor: the listener. Target: the entity that sent the signal.
bientity_conditionBi-entity conditionoptionalBoth actions only run when it's true, with the same actor and target.

It also takes Origins' usual condition. A listener ignores signals while it's false.

Example: "Rally". Any origin with this power gets Strength when it hears a war cry from a friend.

json
{
  "type": "origins-powerful-powers:action_on_signal",
  "signals": [
    "mypack:war_cry"
  ],
  "bientity_condition": {
    "type": "origins:in_same_team"
  },
  "entity_action": {
    "type": "origins:apply_effect",
    "effect": {
      "effect": "minecraft:strength",
      "duration": 200
    }
  }
}