Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.
Is there a script that can load a map (showing a picture while it loads) and all the events on in, including the variables, before you get on the map to reduce lag?
Uhm... Showing anything will increase the time the player has to wait because then there is more to process.
Do you get a 'script hanging' error?
If not, then you could probably cheat by just showing a picture before you do a transition and remove it afterwards.
theres really no way to remove the lag by doing this... i recommend doing what many scripters do to reduce lag, make events and map load only occure within a specified area (e.g. you only load your current screen and 3 blocks outside your character's view).
if you need to set lots of starting data and such (which may take a while) then a loading screen would be good... otherwise its pointless... the way maps are loaded removes enough lag anyway.
It's the game I'm making, I need to randomise about 40 variables and set 20 switches in one go as soon as the game starts and I think it might cause lag.
make that loading process a new class and then after each variable or item you need to create make a bar or something increase in size...
this gives the illusion of a loading bar but once all items are created they run off of the computer memory... as long as you have enough of that your good