Difference between revisions of "Script - Splash Screen"
From FreeSpace Wiki
Goober5000 (talk | contribs) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Table230| | |
− | Randomizes the splash screen instead of showing the same picture every the game is started. | + | This script became nonfunctional after some necessary changes to the game initialization sequence. As such, the splash screen hook has been deprecated. To randomize the splash screen image, use the [[Game_settings.tbl#.24Splash_screens:|$Splash screens:]] option in game_settings.tbl. |
+ | }} | ||
+ | |||
+ | <hr> | ||
+ | |||
+ | Randomizes the splash screen instead of showing the same picture every time the game is started. | ||
*Splash screen images must be named Preloadxx (x is value from 0 to 99) | *Splash screen images must be named Preloadxx (x is value from 0 to 99) | ||
Line 13: | Line 18: | ||
end | end | ||
] | ] | ||
− | +Override: | + | +Override: true |
#End</pre> | #End</pre> | ||
− | [[Category:Scripting Examples]] | + | [[Category:Scripting Examples|Splash Screen]] |
Latest revision as of 02:38, 28 July 2023
FS2 Open, 23.0:
This script became nonfunctional after some necessary changes to the game initialization sequence. As such, the splash screen hook has been deprecated. To randomize the splash screen image, use the $Splash screens: option in game_settings.tbl.
Randomizes the splash screen instead of showing the same picture every time the game is started.
- Splash screen images must be named Preloadxx (x is value from 0 to 99)
Table Entry
#Global hooks $Splash: [ random_number = ma.getRandomNumber(0, 99) if gr.getScreenWidth() < 1024 then gr.drawImage("PreLoad" .. random_number, 0, 0) else gr.drawImage("2_PreLoad" .. random_number, 0, 0) end ] +Override: true #End