545 local Angle, Power, WDTimer, Radius, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint = GetGearValues(myGear) |
545 local Angle, Power, WDTimer, Radius, Karma, DirAngle, AdvBounce, ImpactSound, nImpactSounds, Tint = GetGearValues(myGear) |
546 </code> |
546 </code> |
547 |
547 |
548 === <tt>!GetVisualGearValues(vgUid)</tt> === |
548 === <tt>!GetVisualGearValues(vgUid)</tt> === |
549 This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles. It returns the following values: |
549 This returns the typically set visual gear values, useful if manipulating things like smoke or bubbles or circles. It returns the following values: |
550 X, Y, dX, dY, Angle, Frame, !FrameTicks, State, Timer, Tint |
550 |
551 X, Y typically position, dX, dY typically speed, Angle is usually the rotation angle, Frame is typically the animation frame, !FrameTicks is usually an animation counter. State can have a variety of values, but is typically bit packed, Timer is usually the gear lifetime and Tint is the colour. |
551 `X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint` |
|
552 |
|
553 * `X`, `Y`: typically position |
|
554 * `dX`, `dY`: typically speed |
|
555 * `Angle` is usually the rotation angle |
|
556 * `Frame` is typically the animation frame |
|
557 * `FrameTicks` is usually an animation counter |
|
558 * `State` can have a variety of values, but is typically bit packed |
|
559 * `Timer` is usually the gear lifetime |
|
560 * `Tint` is the RGBA color |
|
561 |
552 Most visual gears require little to no modification of parameters. |
562 Most visual gears require little to no modification of parameters. |
553 |
563 |
554 Example: |
564 Example: |
555 |
565 |
556 <code language="lua"> GetVisualGearValues(vgUid) -- return visual gear values |
566 <code language="lua"> GetVisualGearValues(vgUid) -- return visual gear values |