API:AnimatedImageSetPlaySpeed
From RoR Wiki
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,
AnimatedImageelements give their speed with anfpsattribute, for examplefps="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 existError 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 )
