LuaAPI.wiki
changeset 1398 704301f9bd1d
parent 1391 86bada04da8f
child 1409 755e96dd1ff1
equal deleted inserted replaced
1397:63655141bb8f 1398:704301f9bd1d
  1541 
  1541 
  1542 **Important**: If you use `ParseCommand` to overcome a shortcoming in our Lua API (e.g. a missing function), please make sure to [https://issues.hedgewars.org/enter_bug.cgi report the issue].
  1542 **Important**: If you use `ParseCommand` to overcome a shortcoming in our Lua API (e.g. a missing function), please make sure to [https://issues.hedgewars.org/enter_bug.cgi report the issue].
  1543 
  1543 
  1544 With your report we can fix the shortcoming in future releases. We will try to remove the reliance on `ParseCommand` as good as possible. This will allow scripts to use the previously missing feature in a way that won’t break!
  1544 With your report we can fix the shortcoming in future releases. We will try to remove the reliance on `ParseCommand` as good as possible. This will allow scripts to use the previously missing feature in a way that won’t break!
  1545 
  1545 
  1546 There are many available commands, but only a few of them are useful for scripting. These are commands used in official scripts in 0.9.22:
  1546 There are many available commands, but actual use in scripting is rare, and even then it's discouraged for long-term use. As of 0.9.24, the only command used in official scripts is:
  1547 
  1547 
  1548  * `"skip"`: Current hedgehog skips its turn
       
  1549  * `"draw <map>"`: Draws a hand-drawn map. `MapGen` must be `mgDrawn` for this to work. `<map>` is a string which must follow the format specified in [DrawnMapFormat]
  1548  * `"draw <map>"`: Draws a hand-drawn map. `MapGen` must be `mgDrawn` for this to work. `<map>` is a string which must follow the format specified in [DrawnMapFormat]
  1550 
  1549 
  1551 Moreover, the control action names as listed in [ConfigurationFiles] (under “Binds”) can be used. Note we will eventually try to remove all `ParseCommand`s in the official scripts.
  1550 Moreover, the control action names as listed in [ConfigurationFiles] (under “Binds”) can be used. Note we will eventually try to remove all `ParseCommand`s in the official scripts.
  1552 
  1551 
  1553 === <tt>!EndLuaTest(success)</tt> ===
  1552 === <tt>!EndLuaTest(success)</tt> ===