LuaAPI: RopePercent, ScreenWidth, ScreenHeight
authorWuzzy
Mon, 28 Mar 2016 21:25:36 +0100
changeset 822 a946cbc1e636
parent 821 2bf17581d46b
child 823 83dacaa4d7d0
LuaAPI: RopePercent, ScreenWidth, ScreenHeight
LuaAPI.wiki
--- a/LuaAPI.wiki	Mon Mar 28 21:01:12 2016 +0100
+++ b/LuaAPI.wiki	Mon Mar 28 21:25:36 2016 +0100
@@ -140,7 +140,7 @@
 
 === <tt>onGameInit()</tt> ===
 This function is called before the game loads its resources. One can modify various game variables here:
- * <tt>Seed = 0</tt> - sets the seed of the random number generator
+ * <tt>Seed = 0</tt> - seed of the random number generator
  * <tt>!GameFlags</tt> - all !GameFlags combined as a bitmask. See [LuaAPI#GameFlags_functions] for easier manipulation of !GameFlags
  * <tt>Ready = 5000</tt> - the ready timer at the start of the round (in milliseconds)
  * <tt>Delay = 0</tt> - delay between each round in ms
@@ -150,6 +150,7 @@
  * <tt>!HealthCaseProb = 35</tt> - chance of receiving a health crate
  * <tt>!HealthCaseAmount = 25</tt> - amount of health in a health crate
  * <tt>!DamagePercent = 100</tt> - percent of damage to inforce
+ * <tt>!RopePercent = 100</tt> - rope length in percent
  * <tt>!MinesNum = 0</tt> - number of mines being placed (before 0.9.14 !LandAdds)
  * <tt>!MinesTime = 3000</tt> - time for a mine to explode from activated (in milliseconds), -1000 for random
  * <tt>!MineDudPercent = 0</tt> - chance of mine being a dud
@@ -164,6 +165,8 @@
  * <tt>!TemplateFilter</tt> - _unknown meaning_
  * <tt>!TemplateNumber</tt> - _unknown meaning_
  * <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).
+ * <tt>!ScreenWidth</tt> - width of the Hedgewars window
+ * <tt>!ScreenHeight</tt> - heigtht of the Hedgewars window
 
 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.