LuaAPI.wiki
changeset 1510 b402473a77ba
parent 1506 a1bfc81f6295
child 1511 3c0c822ecdb9
equal deleted inserted replaced
1509:9c51e2c8572c 1510:b402473a77ba
   713     end
   713     end
   714 end
   714 end
   715 </code>
   715 </code>
   716 
   716 
   717 === <tt>!SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, !FrameTicks, State, Timer, Tint)</tt> ===
   717 === <tt>!SetVisualGearValues(vgUid, X, Y, dX, dY, Angle, Frame, !FrameTicks, State, Timer, Tint)</tt> ===
   718 This allows manipulation of many of the visual gear values of the visual gear `vgUid`. All visual gear values are numbers. Each visual gear may be using these parameters differently, but the *usual* meaning of these is the following:
   718 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.
       
   719 
       
   720 All visual gear values are numbers. Each visual gear may be using these parameters differently, but the *usual* meaning of these is the following:
   719 
   721 
   720  * `X`, `Y`: Position
   722  * `X`, `Y`: Position
   721  * `dX`, `dY`: Speed along the X and Y axis
   723  * `dX`, `dY`: Speed along the X and Y axis
   722  * `Angle`: Current rotation
   724  * `Angle`: Current rotation
   723  * `Frame`: Image frame, if using a sprite sheet
   725  * `Frame`: Image frame, if using a sprite sheet
   724  * `FrameTicks`: ???
   726  * `FrameTicks`: ???
   725  * `State`: Helper value to save some internal state
   727  * `State`: Helper value to save some internal state
   726  * `Timer`: Time in milliseconds until it expires
   728  * `Timer`: Time in milliseconds until it expires
   727  * `Tint`: RGBA color
   729  * `Tint`: RGBA color
   728 
   730 
   729 Some visual gears interpret these values differently, just like normal gears. See [VisualGearTypes] for details.  Also, most visual gears are not even using some of these values.
   731 Some visual gears interpret these values differently, just like normal gears. See [VisualGearTypes] for details.  Also, most visual gears are not using all possible values, while some values are just ignored.
   730 
   732 
   731 Note that most visual gears require little to no modification of their values.
   733 Note that most visual gears require little to no modification of their values.
   732 
   734 
   733 Example 1:
   735 Example 1:
   734 
   736