LuaAPI.wiki
changeset 1046 1e19a1a5a450
parent 1044 bc4dca5e6124
child 1054 0de5837d0fc5
equal deleted inserted replaced
1045:54979ae0e5ac 1046:1e19a1a5a450
  1351 
  1351 
  1352 === `DumpPoint(x, y)` (0.9.23) ===
  1352 === `DumpPoint(x, y)` (0.9.23) ===
  1353 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each.
  1353 Converts the whole numbers `x` and `y` to strings and writes them to `Logs/game0.log`, one line each.
  1354 
  1354 
  1355 === <tt>!ParseCommand(string)</tt> ===
  1355 === <tt>!ParseCommand(string)</tt> ===
  1356 Makes the game client parse the specified internal game engine command.
  1356 Makes the game client parse and execute the specified internal game engine command.
  1357 
  1357 
  1358 The available commands depend on the engine protocol. *Note*: Please be aware that the *engine protocol can (and will) change* between releases. It is not recommended to use this function in custom scripts.
  1358 The available commands depend on the current engine protocol version. The *engine protocol can (and will) change* between releases.
  1359 
  1359 
  1360 There are many available commands, but only a few of them are useful for scripting. This is a list of useful commands in version 0.9.22:
  1360 **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].
       
  1361 
       
  1362 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!
       
  1363 
       
  1364 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:
  1361 
  1365 
  1362 * `"skip"`: Current hedgehog skips its turn
  1366 * `"skip"`: Current hedgehog skips its turn
  1363 * `"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]
  1367 * `"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]
  1364 
  1368 
  1365 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]. We will try to remove the reliance on `ParseCommand` as good as possible.
  1369 Moreover, the control action names as listed [ConfigurationFiles#[Binds] here] can be used. Note we will eventually try to remove all `ParseCommand`s in the official scripts.
  1366 
       
  1367 With your report we can fix the shortcoming in future releases.
       
  1368 This will allow scripts to use the previously missing feature in a way that won’t break!
       
  1369 
       
  1370