# HG changeset patch # User Wuzzy # Date 1441844566 0 # Node ID a1d30b3b866c8061d441b56561374c09372334c9 # Parent b5b545b29e6a9b2792a0053847fca2ddce583be8 Elasticity and friction diff -r b5b545b29e6a -r a1d30b3b866c LuaAPI.wiki --- 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. === !GetGearElasticity(gearUid) === -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. + +=== !GetGearFriction(gearUid) === +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. === !GetHogClan(gearUid) === Returns the clan ID of the specified hedgehog gear. @@ -633,6 +638,12 @@ === !SetFlightTime(gearUid, flighttime) === Sets the `FlightTime` of the given gear to `flighttime`. The meaning of `FlightTime` is explained in the section `GetFlightTime`. +=== !SetGearElasticity(gearUid, Elasticity) === +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`. + +=== !SetGearFriction(gearUid, Friction) === +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. + === !SetAmmo(ammoType, count, probability, delay, numberInCrate) === 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.