Skip to main content

Force Swap (Entity Action Type)

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

Type ID: origins:force_swap

note

This action comes from the Origins mod. It only works on players, and only on the server.

Fields

FieldTypeDefaultDescription
modeStringlinearlinear moves to the next option in order, wrapping the way the layer's wrap_to_main says. random picks a different option at random, and main returns to the main origin.
layerIdentifieroptionalThe layer to swap on, either the target layer or the swappable layer itself. Defaults to the first layer that has a swappable pool.
originIdentifieroptionalSwaps straight to this origin, ignoring mode. Does nothing if it isn't in the player's pool.
include_mainBooleantrueIn random mode, whether the main origin is one of the possible results.

The action does nothing when the pool is empty.

Examples

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

This power swaps the player to a random origin from their pool every 600 ticks (30 seconds).

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

This action sends the player back to their own origin, for example when a resource runs out.