# HG changeset patch # User Wuzzy # Date 1459196736 -3600 # Node ID a946cbc1e636e07b5088ee0661eb70a9409cec45 # Parent 2bf17581d46bf0a61235f2ba320ba08788b4c031 LuaAPI: RopePercent, ScreenWidth, ScreenHeight diff -r 2bf17581d46b -r a946cbc1e636 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 @@ === onGameInit() === This function is called before the game loads its resources. One can modify various game variables here: - * Seed = 0 - sets the seed of the random number generator + * Seed = 0 - seed of the random number generator * !GameFlags - all !GameFlags combined as a bitmask. See [LuaAPI#GameFlags_functions] for easier manipulation of !GameFlags * Ready = 5000 - the ready timer at the start of the round (in milliseconds) * Delay = 0 - delay between each round in ms @@ -150,6 +150,7 @@ * !HealthCaseProb = 35 - chance of receiving a health crate * !HealthCaseAmount = 25 - amount of health in a health crate * !DamagePercent = 100 - percent of damage to inforce + * !RopePercent = 100 - rope length in percent * !MinesNum = 0 - number of mines being placed (before 0.9.14 !LandAdds) * !MinesTime = 3000 - time for a mine to explode from activated (in milliseconds), -1000 for random * !MineDudPercent = 0 - chance of mine being a dud @@ -164,6 +165,8 @@ * !TemplateFilter - _unknown meaning_ * !TemplateNumber - _unknown meaning_ * !MapFeatureSize - 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). + * !ScreenWidth - width of the Hedgewars window + * !ScreenHeight - 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.