Difference between revisions of "Script - Splash Screen"

From FreeSpace Wiki
Jump to: navigation, search
m
m (fixed due change in scripting)
Line 13: Line 13:
 
end
 
end
 
]
 
]
+Override: YES
+
+Override: true
 
#End</pre>
 
#End</pre>
  
 
[[Category:Scripting Examples|Splash Screen]]
 
[[Category:Scripting Examples|Splash Screen]]

Revision as of 07:46, 7 July 2006

Function

Randomizes the splash screen instead of showing the same picture every 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