Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:WindowGetGameActionData

From RoR Wiki
Revision as of 19:51, 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 · Window functions
Version: WAR 1.4.8

Returns the game action attached to a window.

actionType, actionId, actionText = WindowGetGameActionData(windowName)

Arguments

windowName
string – Name of the window.

Returns

actionType
number – The kind of action, a GameData.PlayerActions value.
actionId
number – The action's id, for example an ability id.
actionText
wstring – The action's text, for example the name of the player to target.

Details

  • The values are the ones set with WindowSetGameActionData.
  • If the window has no game action, nothing is returned, so all three variables are nil.
  • If the window does not exist, the error is logged and nothing is returned.
  • The function needs at least one argument and only reads the last one.

Errors

This is written to the UI log; the call returns normally.

  • Error in function call 'WindowGetGameActionData': Window %s does not exist.

Example

From ea_modifyitem/source/useitemtargeting.lua:

local actionType, actionId, actionText = WindowGetGameActionData( SystemData.MouseOverWindow.name )

if( actionType == GameData.PlayerActions.SET_TARGET )
then

See also