LuaGears: Document most GetGearValues vars draft
authorWuzzy
Wed, 24 Jun 2020 17:49:03 +0200
changeset 2160 9d683fe2f4f9
parent 2159 0a57d46f287a
child 2161 704eebb4c2d8
LuaGears: Document most GetGearValues vars
LuaGears.wiki
--- a/LuaGears.wiki	Fri Jun 12 02:54:44 2020 +0200
+++ b/LuaGears.wiki	Wed Jun 24 17:49:03 2020 +0200
@@ -381,14 +381,23 @@
 
 `Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint, Damage, Boom`
 
-A rough description of some of the parameters:
+That the concrete meaning of each of this variables depends on the gear type and can vary wildly. For most gear types, many of these variables are unused and have no effect.
+
+Here's an overview of the purpose of these variables:
 
+ * `Angle`: Angle the gear was launched in (usually)
+ * `Power`: Power the gear was launched in (usually)
+ * `WDTimer`: An alternative timer variable, used by some more complex gears like air mines
  * `Radius`: Effect or collision radius, most of the time
- * `Density`: A high density makes the gear less prone to being pushed by forces, like explosons and stuff. Gears with a higher density also make a larger splash
+ * `Density`: A high density makes the gear less prone to being pushed by forces, like explosions, wind and stuff. Gears with a higher density also make a larger splash
+ * `Karma`: Used to track karma damage for hedgehogs in the Karma game modifier, but abused for different purposes for other gears, too
+ * `DirAngle`: ???
+ * `AdvBounce`: ???
  * `ImpactSound`: Sound it makes on a collision (see [Sounds])
  * `nImpactSounds`: Must be used together with `ImpactSound`. Number of different impact sounds to use. `0`: Disable impact sound. `1`: Use sound selected in `ImpactSound`. `2` or higher: Uses a random impact sound each impact. The first possible sound is `ImpactSound`, the second possible sound is `ImpactSound+1`, and so on. The order of sounds is specified at [https://hg.hedgewars.org/hedgewars/file/default/hedgewars/uTypes.pas#l120]. For example, if `ImpactSound` is `sndHellishImpact1` and `nImpactSounds` equals 4, the impact sounds will be `sndHellishImpact1` to `sndHellishImpact4`
- * `Tint`: Used by some gear types to determine its colorization. The color is in RGBA format.
- * `Boom`: Used by most gears to determine the damage dealt.
+ * `Tint`: Colorization of gear. The color is in RGBA format. Not supported by all gears.
+ * `Damage`: Amount of damage taken by gear. Only used by a few gears.
+ * `Boom`: Used by most gears to determine the potential damage / explosion size
 
 Example:
 <code language="lua">