LuaGears: Move SetGearValues
authorWuzzy
Wed, 17 Apr 2019 13:34:00 +0100
changeset 1782 503aa47f3aaf
parent 1781 2d057448d499
child 1783 b25684cd9837
LuaGears: Move SetGearValues
LuaGears.wiki
--- a/LuaGears.wiki	Wed Apr 17 13:33:23 2019 +0100
+++ b/LuaGears.wiki	Wed Apr 17 13:34:00 2019 +0100
@@ -329,6 +329,21 @@
      HideHog(gear) -- Hide the newly created gear.
      RestoreHog(gear) -- Restore the newly hidden gear.</code>
 
+=== <tt>!SetGearValues(gearUid, Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, ImpactSounds, Tint, Damage, Boom)</tt> ===
+Sets various gear value for the specified gear (`gearUid`). The meaining of each value often depends on the gear type. See the documentation on !GetGearValues for a brief description of the gear values. If `gearUid` is invalid or the gear does not exist, nothing happens.
+
+Set `nil` for each value you do not want to change.
+
+Example:
+<code language="lua">
+-- Paints all RC planes into a white color
+function onGearAdd(gear)
+    if GetGearType(gear) == gtRCPlane then
+         SetGearValues(gear, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0xFFFFFFFF)
+    end
+end
+</code>
+
 === <tt>!SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, !FrameTicks, State, Timer, Tint, Scale)</tt> ===
 This allows manipulation of the internal state of the visual gear `vgUid`. If `vgUid` is invalid or the `vgUid` does not refer to an existing visual gear, the function does nothing. Thus, you can safely call this function even if you are not sure if the visual gear actually exists.
 
@@ -610,19 +625,3 @@
 
 <code language="lua">    vgear = AddVisualGear(...)
     DeleteVisualGear(vgear) -- Delete the newly created visual gear.</code>
-
-=== <tt>!SetGearValues(gearUid, Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, ImpactSounds, Tint, Damage, Boom)</tt> ===
-Sets various gear value for the specified gear (`gearUid`). The meaining of each value often depends on the gear type. See the documentation on !GetGearValues for a brief description of the gear values. If `gearUid` is invalid or the gear does not exist, nothing happens.
-
-Set `nil` for each value you do not want to change.
-
-Example:
-<code language="lua">
--- Paints all RC planes into a white color
-function onGearAdd(gear)
-    if GetGearType(gear) == gtRCPlane then
-         SetGearValues(gear, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0xFFFFFFFF)
-    end
-end
-</code>
-