Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SetLiveEventTaskImage

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

Loads the picture of a live event task, so that its textureName can be used as a texture.

SetLiveEventTaskImage(eventId, taskId)

Arguments

eventId
number – Event id.
taskId
number – Task id, the taskId field from GetLiveEventTasks.

Returns

Nothing.

Details

  • The image file is taken from interface/InterfaceCore/Tome/LiveEvent/Images/ and registered under the task's textureName. Use that name with DynamicImageSetTexture, as the stock UI does.
  • Each task's picture is loaded only once; later calls for the same task do nothing. Tasks without a picture are ignored without an error.
  • The function needs at least two arguments and only reads the last two.

Errors

These are written to the UI log; the call returns normally.

  • Error in function call 'SetLiveEventTaskImage': Event %d not found. (also for an event that exists but is inactive)
  • Error in function call 'SetLiveEventTaskImage': Task %d not found in event %ls.
  • Error in function call 'SetLiveEventTaskImage': The specified image was not found for task %d in event %ls.

Example

From default/ea_tomeofknowledge/source/tomewindow_liveevent.lua:

SetLiveEventTaskImage( TomeWindow.CurrentLiveEventId, task.taskId )
DynamicImageSetTexture( winName, task.textureName, 0, 0)

See also