LuaAPI.wiki
changeset 894 aa3027b760bb
parent 893 e8664c10f69b
child 907 69a88515a116
equal deleted inserted replaced
893:e8664c10f69b 894:aa3027b760bb
  1106 AddCaption("Melon bomb rain in 2 rounds!", 0xFF0000FF, capgrpGameState)
  1106 AddCaption("Melon bomb rain in 2 rounds!", 0xFF0000FF, capgrpGameState)
  1107 -- Green example message.
  1107 -- Green example message.
  1108 </code>
  1108 </code>
  1109 
  1109 
  1110 === <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> ===
  1110 === <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> ===
  1111 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). If `time` is set to 0, it will be displayed for a default amount of time.
  1111 This function will open the mission panel and set the texts in it.
  1112 This function replaces the *entire* text of the pop-up. Compare this to the global `Goals` variable, which *adds* to the default text without replacing it.
  1112 
       
  1113 Use to tell the player what he/she is supposed to do. If you use this function, a mission panel is shown for the amount of time specified in `time` (in milliseconds). If `time` is set to 0, it will be displayed for a default amount of time.
       
  1114 This function replaces the *entire* text of the mission panel. Compare this to the global `Goals` variable, which *adds* to the default text without replacing it.
  1113 
  1115 
  1114 `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.
  1116 `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.
  1115 
  1117 
  1116 `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.
  1118 `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.
  1117 
  1119 
  1133 <code language="lua">
  1135 <code language="lua">
  1134 ShowMission(loc("Nobody Laugh"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), 0, 0)
  1136 ShowMission(loc("Nobody Laugh"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), 0, 0)
  1135 </code>
  1137 </code>
  1136 
  1138 
  1137 === <tt>!HideMission()</tt> ===
  1139 === <tt>!HideMission()</tt> ===
  1138 Hides the mission. This function is currently bugged somehow and will completely ruin your life, and your script should you happen to use it.
  1140 Hides the mission panel if it is currently displayed, otherwise, this function does nothing.
  1139 
  1141 
  1140 === <tt>!SetZoom(zoomLevel)</tt> ===
  1142 === <tt>!SetZoom(zoomLevel)</tt> ===
  1141 Sets the zoom level. The value for maximum zoom is currently 1.0 and for minimum 3.0 The default zoom level is 2.0
  1143 Sets the zoom level. The value for maximum zoom is currently 1.0 and for minimum 3.0 The default zoom level is 2.0
  1142 
  1144 
  1143 === <tt>!GetZoom()</tt> ===
  1145 === <tt>!GetZoom()</tt> ===