diff -r 751f58cf9ca6 -r 168508caf60d LuaAPI.wiki --- a/LuaAPI.wiki Sun Dec 07 17:49:56 2014 +0000 +++ b/LuaAPI.wiki Sun Dec 07 17:56:37 2014 +0000 @@ -100,6 +100,11 @@ Can be used to show the mission and for more setup, for example initial target spawning. +=== onPreviewInit() === +This function is called when the map preview in the frontend is initialized. This happens when the script is selected or you change a map generator parameter. + +It is useful for scripts which create their own maps (see `AddPoint` and `FlushPoints`). If you create a map in this function, a preview will be generated from this map and is exposed to the frontend. + === onGameTick() ===
This function is called on every game tick, i.e. 1000 times a second. If you just need to check on something periodically, consider...