Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:AnimatedImageSetPlaySpeed

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

Sets how fast an AnimatedImage plays.

AnimatedImageSetPlaySpeed(imageName, framesPerSecond)

Arguments

imageName
string – Name of an AnimatedImage window.
framesPerSecond
number – Playing speed in frames per second.

Returns

Nothing.

Details

  • The client stores the time per frame, 1 / framesPerSecond. There is no check for 0; with 0 the animation does not advance.
  • In the stock XML, AnimatedImage elements give their speed with an fps attribute, for example fps="10".
  • The function needs at least two arguments and only reads the last two.
  • Note the wording of the second error message: it has no "Window" before the name.

Errors

  • Error in function call 'AnimatedImageSetPlaySpeed': Window %s does not exist
  • Error in function call 'AnimatedImageSetPlaySpeed': %s is not an AnimatedImage

Example

From ea_loadingscreen/source/standardloadingscreen.lua (FLIP_FPS is 12):

AnimatedImageSetPlaySpeed( windowName.."PageFlipAnim", EA_Window_LoadingScreen.FLIP_FPS )

See also