author Wuzzy Thu, 10 Sep 2015 00:22:46 +0000 changeset 611 a1d30b3b866c parent 610 b5b545b29e6a child 612 376d1dcb3114
Elasticity and friction
 LuaAPI.wiki file | annotate | diff | comparison | revisions
```--- a/LuaAPI.wiki	Thu Sep 10 00:13:51 2015 +0000
+++ b/LuaAPI.wiki	Thu Sep 10 00:22:46 2015 +0000
@@ -417,7 +417,12 @@
For example: The `FlightTime` of a hedgehog (`gtHedgehog`) is the time since they last have stood on solid ground. For most projectile gear types (i.e. `gtShell`), it stores the time after it has been launched.

=== <tt>!GetGearElasticity(gearUid) </tt> ===
-Returns the elasticity of the specified gear. Useful for determining if a hog is on a rope or not. If a hog is attached to a rope, or is busy firing one, the elasticity of the rope will be non-zero.
+Returns the elasticity of the specified gear. The elasticity normally determines how strong the gear will bounce after collisions, where higher elasticity is for stronger bounces.
+
+This is also useful for determining if a hog is on a rope or not. If a hog is attached to a rope, or is busy firing one, the elasticity of the rope will be non-zero.
+
+=== <tt>!GetGearFriction(gearUid) </tt> ===
+Returns the friction of the specified gear. The friction normally determines how well the gear will slide on terrain. Higher values are for increased sliding properties.

=== <tt>!GetHogClan(gearUid)</tt> ===
Returns the clan ID of the specified hedgehog gear.
@@ -633,6 +638,12 @@
=== <tt>!SetFlightTime(gearUid, flighttime)</tt> ===
Sets the `FlightTime` of the given gear to `flighttime`. The meaning of `FlightTime` is explained in the section `GetFlightTime`.

+=== <tt>!SetGearElasticity(gearUid, Elasticity) </tt> ===
+Sets the elasticity of the specified gear. For most gears, the elasticity determines how strong the gear will bounce after collisions, where higher elasticity is for stronger bounces. Recommended are values between `0` and `9999`.
+
+=== <tt>!SetGearFriction(gearUid, Friction) </tt> ===
+Sets the friction of the specified gear. The friction normally determines how well the gear will slide on terrain. Higher values are for increased sliding properties. `0` is for no sliding whatsoever, where `9999` is for very long slides, greater values are not recommended.
+
=== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ===
This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the `onAmmoStoreInit()` event handler.
```