# HG changeset patch
# User Wuzzy
# Date 1444676528 0
# Node ID f161ad0b976df2f2db990ef5c85421e74b177c0e
# Parent 349ec30bf87cdce0dfd2c688767f4bf3626d3a94
Explain all arguments of ShowMission
diff -r 349ec30bf87c -r f161ad0b976d 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 @@
=== !ShowMission(caption, subcaption, text, icon, time) ===
-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:
+
+ShowMission(loc("Nobody Laugh"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), 0, 0)
+
+
=== !HideMission() ===
Hides the mission. This function is currently bugged somehow and will completely ruin your life, and your script should you happen to use it.