Add onPreviewInit
Sun, 07 Dec 2014 17:56:37 +0000
changeset 461 168508caf60d
parent 460 751f58cf9ca6
child 462 4416c2ed13d8
Add onPreviewInit
--- a/	Sun Dec 07 17:49:56 2014 +0000
+++ b/	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.
+=== <tt>onPreviewInit()</tt> ===
+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.
 === <tt>onGameTick()</tt> ===
 <blockquote>This function is called on every game tick, i.e. 1000 times a second.  If you just need to check on something periodically, consider...