API:IsAbilityToggledOn
From RoR Wiki
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–trueif the ability is in the client's list of toggle states with a non-zero state.
Details
falseis 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
