Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetActionIdFromName

From RoR Wiki

UI Lua API · Game functions
Version: WAR 1.4.8

Returns the numeric id of a key-bindable action, given its name.

actionId = GetActionIdFromName(actionName)

Arguments

actionName
string – Name of the action.

Returns

actionId
number – Id of the action, from 0 to 249, or 65535 if no action has that name.

Details

  • The name is compared with the client's list of 250 action names without regard to case.
  • An unknown name is not an error. It returns 65535.
  • GetActionNameFromId does the reverse lookup.

Errors

None.

Example

Making an action button trigger its game action, from ea_actionbars/source/actionbutton.lua:

WindowSetGameActionTrigger (windowName, GetActionIdFromName (actionButton:GetActionName ()))

See also