Preloader

Parameters
filename string

The file to execute.

comment

Executes the preload-file.

note

Also see the documentation of Preload to see how to properly get the data into the preload script.

note

If you use Preloader to load some values into your map, these values are very likely to be different for each player (since the player might not even have local files enabled), so treat them as async values.

note

Here are some ways to get the data out of the preload file into your map: To store multiple integers you can use SetPlayerTechMaxAllowed to have a good 2d-array. Read via GetPlayerTechMaxAllowed.

For strings SetPlayerName is suited. To read use GetPlayerName.

Inside the preload script you can also use ExecuteFunc to call your map-defined functions and interleave the preload script with your functions.

note

This only works if you have enable the usage of local files in your registry. The registry key is HKEY_CURRENT_USER\\Software\\Blizzard Entertainment\\Warcraft III\\Allow Local Files\

return type
nothing
Source code
native Preloader        takes string filename returns nothing
Source
misc.j
wc3modding.com
Preloader