Skip to content

XsObjectHasAction

Query object has action from native game state.

XsObjectHasAction(playerId, unitType, actionId[, targetPlayerId = -1[, targetType = -1[, targetLevel = -1]]])

Inputs: playerId, unitType, and actionId are required integers. targetPlayerId, targetType, and targetLevel are optional integers, each defaulting to -1.

Output: value, available: boolean when available is true; nil, false when unavailable.

Errors and unavailable states: Wrong numeric argument types raise a Lua argument error. Invalid IDs or an unavailable native query return nil, false; use the availability flag before reading the value.

See Low-level queries for related calls and usage notes.