Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:ForceUpdateWorldObjectWindow

From RoR Wiki

UI Lua API · WorldObject functions
Version: WAR 1.4.8

Makes the client place a window attached to a world object again on the next frame.

ForceUpdateWorldObjectWindow(worldObjectId, windowName)

Arguments

worldObjectId
number – ID of the world object the window is attached to.
windowName
string – Name of the attached window.

Returns

Nothing.

Details

  • Note the argument order: the object ID comes first here, unlike AttachWindowToWorldObject and DetachWindowFromWorldObject.
  • An attached window is normally only moved when its object's projected screen position changes. This call clears the remembered position, so the window is placed again on the next frame. Use it after changing the window's size, as the stock chat bubbles do.
  • If the window is not attached to that object, nothing happens.
  • If an argument has the wrong type, the Invalid Parameters message names DetachWindowFromWorldObject, not this function.
  • The function needs at least two arguments and only reads the last two.

Errors

  • Error in function call 'ForceUpdateWorldObjectWindow': window %s does not exist

Example

Placing a chat bubble group again after resizing it, from default/ea_chatsystem/source/chatmanager.lua:

WindowSetDimensions( targetGroup, groupWindowSize.x, groupWindowSize.y )
ForceUpdateWorldObjectWindow( worldObjNum, targetGroup )

See also