526 |
526 |
527 === <tt>!GetGearPos(gearUid)</tt> === |
527 === <tt>!GetGearPos(gearUid)</tt> === |
528 Get pos of specified gear. |
528 Get pos of specified gear. |
529 |
529 |
530 === <tt>!GetGearValues(gearUid)</tt> (0.9.22) === |
530 === <tt>!GetGearValues(gearUid)</tt> (0.9.22) === |
531 This returns 12 values associated with the gear, their meaning is often depending on the gear type and many values might be unused for certain gear types. |
531 This returns a bunch of values associated with the gear, their meaning is often depending on the gear type and many values might be unused for certain gear types. |
532 |
532 |
533 This is returned (all variables are integers): |
533 This is returned (all variables are integers): |
534 |
534 |
535 `Angle, Power, WDTimer, Radius, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint` |
535 `Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint` |
536 |
536 |
537 A rough description of some of the parameters: |
537 A rough description of some of the parameters: |
538 |
538 |
539 * `Radius`: Effect or collision radius, most of the time |
539 * `Radius`: Effect or collision radius, most of the time |
540 * `ImpactSound`: Sound it makes on a collision (see [[Sounds]]) |
540 * `ImpactSound`: Sound it makes on a collision (see [[Sounds]]) |
541 * `Tint`: Used by some gear types to determine its colorization. The color is in RGBA format. |
541 * `Tint`: Used by some gear types to determine its colorization. The color is in RGBA format. |
542 |
542 |
543 Example: |
543 Example: |
544 <code language="lua"> |
544 <code language="lua"> |
545 -- Get all 12 values in a single line of code: |
545 -- Get all values in a single line of code: |
546 local Angle, Power, WDTimer, Radius, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint = GetGearValues(myGear) |
546 local Angle, Power, WDTimer, Radius, Density, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint = GetGearValues(myGear) |
547 </code> |
547 </code> |
548 |
548 |
549 === <tt>!GetVisualGearValues(vgUid)</tt> === |
549 === <tt>!GetVisualGearValues(vgUid)</tt> === |
550 This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles. It returns the following values: |
550 This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles. It returns the following values: |
551 |
551 |