Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:IsAbilityToggledOn

From RoR Wiki
Revision as of 19:45, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Ability functions
Version: WAR 1.4.8

Returns whether a toggled ability is currently switched on.

isOn = IsAbilityToggledOn(abilityId)

Arguments

abilityId
number – Id of the ability. It is converted to a 16-bit integer.

Returns

isOn
boolean – true if the ability is in the client's list of toggle states with a non-zero state.

Details

  • false is returned for any ability that is not in the list.
  • If there is no player object, or the Lua state is not available, the function returns nothing.
  • The stock UI never calls this function.

Errors

None besides the generic Invalid Parameters message when the argument is missing or not a number.

Example

A minimal example built from the signature:

if( IsAbilityToggledOn( abilityId ) ) then
    -- the ability is switched on
end

See also