LuaAPI.wiki
changeset 646 044ef16b8ac5
parent 645 f161ad0b976d
child 647 42b3e6a6ea8a
equal deleted inserted replaced
645:f161ad0b976d 646:044ef16b8ac5
   151  * <tt>!WaterRise = 47</tt> - height of water rise at sudden death in pixels
   151  * <tt>!WaterRise = 47</tt> - height of water rise at sudden death in pixels
   152  * <tt>!HealthDecrease = 5</tt> - amount of health decreased on sudden death
   152  * <tt>!HealthDecrease = 5</tt> - amount of health decreased on sudden death
   153  * <tt>Map = "Bamboo"</tt> - the map being played
   153  * <tt>Map = "Bamboo"</tt> - the map being played
   154  * <tt>Theme = "Bamboo"</tt> - the theme to be used
   154  * <tt>Theme = "Bamboo"</tt> - the theme to be used
   155  * <tt>!MapGen</tt> - type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`.
   155  * <tt>!MapGen</tt> - type of map generator. One of `mgRandom`, `mgMaze`, `mgPerlin`, `mgDrawn`.
   156  * <tt>Goals = "Jumping is disabled"</tt> - if you want to add info to the game mode dialog, use "|" to separate lines
   156  * <tt>Goals = "Jumping is disabled"</tt> - Use this to add additional text to the goal text popup shown at the beginning and when using the quit or pause keys. The text is added to the default text which usually explains the game modifiers and does not replace it. Use “`|`” for line breaks. Also, all text before and including a “`:`” in a line will be highlighted. See also ShowMission
   157  * <tt>!TemplateFilter</tt> - _unknown meaning_
   157  * <tt>!TemplateFilter</tt> - _unknown meaning_
   158  * <tt>!TemplateNumber</tt> - _unknown meaning_
   158  * <tt>!TemplateNumber</tt> - _unknown meaning_
   159  * <tt>!MapFeatureSize</tt> - Used by random maps to determine its “curvyness” or complexity. This value can be set by the user with the slider under the random map preview in the game setup screen. The user-set value ranges from 1 (leftmost position) to 25 (rightmost position).
   159  * <tt>!MapFeatureSize</tt> - Used by random maps to determine its “curvyness” or complexity. This value can be set by the user with the slider under the random map preview in the game setup screen. The user-set value ranges from 1 (leftmost position) to 25 (rightmost position).
   160 
   160 
   161 If you want to add teams or hogs manually you have to do it here. If you want to draw your own map using `AddPoint` and `FlushPoints`, you have to do this within this function as well.
   161 If you want to add teams or hogs manually you have to do it here. If you want to draw your own map using `AddPoint` and `FlushPoints`, you have to do this within this function as well.
  1049 -- Green example message.
  1049 -- Green example message.
  1050 </code>
  1050 </code>
  1051 
  1051 
  1052 === <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> ===
  1052 === <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> ===
  1053 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).
  1053 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).
       
  1054 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.
  1054 
  1055 
  1055 `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.
  1056 `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.
  1056 
  1057 
  1057 `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.
  1058 `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.
  1058 
  1059