(Created page with " ==band.SetGoalLength== '''Function:''' void band.SetGoalLength(integer bandIndex, number length)<br />'''Description:''' Set the goal length of a band. (Range 0.0 to 10000.0)<b...") |
LociOiling (talk | contribs) m (Use LuaFunctionDetail template.) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
⚫ | |||
− | |||
− | |||
− | ==band.SetGoalLength== |
||
⚫ | |||
== Remarks == |
== Remarks == |
||
+ | This is the "unstretched" or "true" length of the band. If the current length of the band (as set by [[Foldit_Lua_Function_band.Add|band.Add]] or read by [[Foldit_Lua_Function_band.GetLength|band.GetLength]]) is less than the goal length, the band will push the endpoints apart. If the current length is more than the goal length, it will pull the endpoints closer. |
||
− | |||
== Sample == |
== Sample == |
||
⚫ | |||
− | |||
⚫ | |||
<pre> |
<pre> |
||
− | for |
+ | for ii = 1, band.GetCount () do |
− | band.SetGoalLength( |
+ | band.SetGoalLength ( ii, 0) |
end |
end |
||
</pre> |
</pre> |
||
+ | [[Category:Script tutorial]] |
Revision as of 03:26, 19 January 2018
band.SetGoalLength
- Function
- void band.SetGoalLength(integer bandIndex, number length)
- Description
- Set the goal length of a band. (Range 0.0 to 10000.0)
- V1 Function Name
- band_set_length
Remarks
This is the "unstretched" or "true" length of the band. If the current length of the band (as set by band.Add or read by band.GetLength) is less than the goal length, the band will push the endpoints apart. If the current length is more than the goal length, it will pull the endpoints closer.
Sample
This script sets the length of all bands to 0.
for ii = 1, band.GetCount () do band.SetGoalLength ( ii, 0) end