Self Action On Hit
Executes an Entity Action Type on the entity that has the power when the entity hits another entity.
Type ID: origins:self_action_on_hit
Fields
Field | Type | Default | Description |
---|---|---|---|
entity_action |
Entity Action Type | The action to execute on the entity. | |
cooldown |
Integer | 1 |
Interval of ticks this power needs to recharge before the power can be triggered again. |
hud_render |
Hud Render | optional | If specified, determines how the cooldown of this power is visualized on the HUD. |
damage_condition |
Damage Condition Type | optional | If specified, the specified action will only be executed if the damage dealt is fulfills this condition. |
target_condition |
Entity Condition Type | optional | If specified, the specified actions will only be executed if the entity/entities that has been hit fulfills this condition. |
Examples
{
"type": "origins:self_action_on_hit",
"entity_action": {
"type": "origins:heal",
"amount": 8.0
},
"damage_condition": {
"type": "origins:amount",
"comparison": ">=",
"compare_to": 10.0
},
"cooldown": 20
}
This example will restore 4 hearts of health of the entity that has the power if the entity manages to deal 5 or more hearts of damage.