PreloadGenEnd

Parameters
filename string

The filepath to be written to. Max length for filename is 259 characters (see: Windows MAX_PATH).

comment

Writes the current Preload buffer to specified file. The first and final preload directives are call PreloadStart() and call PreloadEnd( realTime ). The value represents the time in seconds between the calls PreloadStart and PreloadGenEnd. There's no way to get this value with the API.

Does not clear the buffer or timer after flushing. The file is overwritten. It's possible to specify subfolders: "myMapFolder/file.txt". Reforged: Any other tricks such as relative paths, UNC or drive letters will not write any files. Classic: possible to write to any path (verify?)

*Example preload file:

function PreloadFiles takes nothing returns nothing

    call PreloadStart()
    call Preload( "units\\human\\Knight\\Knight.mdx" )
    call PreloadEnd( 2.5 )

endfunction
note

Before Reforged (which version?) you needed to enable "Allow Local Files" in registry.

note

Save Path:

Reforged:

  • Windows: %USERPROFILE%\Documents\Warcraft III\CustomMapData\
  • MacOS: ~/Library/Application\ Support/Blizzard/Warcraft\ III/CustomMapData/

Classic: ?

note

See: Preload, PreloadEnd, PreloadStart, PreloadRefresh, PreloadEndEx, PreloadGenClear, PreloadGenStart, Preloader.

patch

1.00

Source
common.j
return type
nothing
Source code
native PreloadGenEnd    takes string filename returns nothing