Postby Emral » Mon Jan 20, 2020 4:20 pm
loadscreen.lua in the episode folder runs during load screens, automatically replacing the default. the lua environment is massively restricted, but you have access to all Graphics functions, as well as the onDraw event.
You can override an episode-wide loadscreen with a loadscreen.lua file in a level folder I THINK? Not sure.
To make the player be able to select a load screen, you need to pass some form of user data to loadscreen.lua. I beliiiiieve SaveData and GameData are not available, so you will probably need to use lua's IO library to handle your own custom file for that.Then you can manipulate that from regular gameplay, and access it from the load screen.
You might also want to keep this around, for loading images:
local episodePath = mem(0x00B2C61C, FIELD_STRING)
800x600 is your canvas size. Doesn't resize properly in preview builds, but that bug is fixed in beta 4, where it will scale like everything else in the game.
We'll make sure to add more thorough information about this to the handbook, but this should be enough to get you started.
Last edited by
Emral on Mon Jan 20, 2020 4:41 pm, edited 1 time in total.