Explain all arguments of ShowMission
authorWuzzy
Mon, 12 Oct 2015 19:02:08 +0000
changeset 645 f161ad0b976d
parent 644 349ec30bf87c
child 646 044ef16b8ac5
Explain all arguments of ShowMission
LuaAPI.wiki
--- a/LuaAPI.wiki	Sat Sep 26 12:18:34 2015 +0000
+++ b/LuaAPI.wiki	Mon Oct 12 19:02:08 2015 +0000
@@ -1050,9 +1050,13 @@
 </code>
 
 === <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> ===
-Use to tell the player what he is supposed to do.
+Use to tell the player what he is supposed to do. If you use this function, a mission pop-up is shown for the amount of time specified in `time` (in milliseconds).
+
+`caption` is the text displayed in the first line, `subcaption` is displayed in the second line and `text` is the text displayed in the third and following lines.
 
-As of version 0.9.15, `icon` currently accepts the following values:
+`text` uses some special characters for formatting: “`|`” is used for a line break, and everything written before and including a “`:`” in a line is written in a lighter color.
+
+As of version 0.9.22, `icon` accepts the following values:
 
 || *`icon`* || *What is shown* ||
 || _negative number_ || Icon of an ammo type. It is specified as the negative of an ammo type constant (see [AmmoTypes]), i.e. `-amBazooka` for the bazooka icon. ||
@@ -1066,6 +1070,11 @@
 || `7` || Ammo crate ||
 || `8` || Barrel ||
 
+Example:
+<code language="lua">
+ShowMission(loc("Nobody Laugh"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), 0, 0)
+</code>
+
 === <tt>!HideMission()</tt> ===
 Hides the mission. This function is currently bugged somehow and will completely ruin your life, and your script should you happen to use it.