Force Swap (Entity Action Type)

Entity action — swaps the player to another origin from their swappable pool.

Swaps the player to another origin from their swappable pool, exactly as if they had pressed the swap key.

Type ID: origins:force_swap — an entity action.

Needs the Origins mod. Registered by Origins, not core Apoli. It only works on players, and only on the server.

Fields

FieldTypeDefaultPurpose
modeString — linear, random or mainlinearlinear advances to the next option in order; random picks a different one at random; main returns to the main origin.
layerIdentifieroptionalWhich layer to swap on. Accepts either the target layer or the swappable layer itself. Defaults to the first layer that has a swappable pool.
originIdentifieroptionalSwap directly to this origin, ignoring mode. Does nothing if it is not in the player’s pool.
include_mainBooleantrueIn random mode, whether the main origin is one of the possible results.

Does nothing when the pool is empty.

Examples

Scramble the player’s origin on a timer:

{
    "type": "apoli:action_over_time",
    "interval": 600,
    "entity_action": {
        "type": "origins:force_swap",
        "mode": "random"
    }
}

Force them back to their own origin when a resource runs out:

{
    "type": "origins:force_swap",
    "mode": "main"
}