Skip to main content

Action On Being Used (Power Type)

Runs an action when a player uses (right-clicks) the entity that has the power. The actor is the entity that right-clicked, and the target is the entity with the power.

Type ID: apoli:action_on_being_used

apoli:action_on_being_used is an alias of apoli:action_on_use with target_used: true filled in. Packs written with either ID work unchanged, and in new packs apoli:action_on_use is clearer.

Fields

FieldTypeDefaultDescription
bientity_actionBi-entity Action TypeoptionalIf set, this action runs on the actor, the target or both.
held_item_actionItem Action TypeoptionalIf set, this action runs on the item the actor right-clicked the target with.
result_item_actionItem Action TypeoptionalIf set, this action runs on the item given to the actor.
bientity_conditionBi-entity Condition TypeoptionalIf set, the actions only run when the actor and target pass this condition.
item_conditionItem Condition TypeoptionalIf set, the actions only run when the item the actor right-clicked with passes this condition.
handsArray of Strings["off_hand", "main_hand"]The hands the actor can use for the power to trigger: "off_hand", "main_hand" or both.
result_stackItem StackoptionalIf set, this item stack is given to the actor.
action_resultAction Result"success"The result of the use action.

Examples

{
    "type": "apoli:action_on_being_used",
    "bientity_action": {
        "type": "apoli:mount"
    },
    "bientity_condition": {
        "type": "apoli:target_condition",
        "condition": {
            "type": "apoli:passenger",
            "inverted": true
        }
    }
}

This lets players ride the entity with the power by right-clicking it, unless it already has a passenger.