LuaAPI.wiki
changeset 1644 009208830d85
parent 1643 2aa0735e0c32
child 1645 35f6bcebe525
equal deleted inserted replaced
1643:2aa0735e0c32 1644:009208830d85
  1437 <code language="lua">
  1437 <code language="lua">
  1438 AddCaption("Melon bomb rain in 2 rounds!", 0xFF0000FF, capgrpGameState)
  1438 AddCaption("Melon bomb rain in 2 rounds!", 0xFF0000FF, capgrpGameState)
  1439 -- Green example message.
  1439 -- Green example message.
  1440 </code>
  1440 </code>
  1441 
  1441 
  1442 === <tt>!ShowMission(caption, subcaption, text, icon, time)</tt> ===
  1442 === <tt>!ShowMission(caption, subcaption, text, icon, time [, forceDisplay])</tt> ===
  1443 This function will open the mission panel and set the texts in it.
  1443 This function will open the mission panel and set the texts in it.
  1444 
  1444 
  1445 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.
  1445 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.
  1446 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.
  1446 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.
  1447 
  1447 
  1461 || `5` || Utility crate ||
  1461 || `5` || Utility crate ||
  1462 || `6` || Health crate ||
  1462 || `6` || Health crate ||
  1463 || `7` || Ammo crate ||
  1463 || `7` || Ammo crate ||
  1464 || `8` || Barrel ||
  1464 || `8` || Barrel ||
  1465 || `9` || Dud mine ||
  1465 || `9` || Dud mine ||
       
  1466 
       
  1467 If the optional parameter `forceDisplay` is `true`, this mission panel cannot be removed manually by the player. It's `false` by default.
  1466 
  1468 
  1467 Example:
  1469 Example:
  1468 <code language="lua">
  1470 <code language="lua">
  1469 ShowMission(loc("Nobody Laugh"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), 0, 0)
  1471 ShowMission(loc("Nobody Laugh"), loc("User Challenge"), loc("Eliminate the enemy before the time runs out"), 0, 0)
  1470 </code>
  1472 </code>