sampfunc - return a value from a function table
value = sampfunc(table_number, index)
Returns the value stored in a specified location of a function table. The function table must already have been created by calling makegen.
makegen(1, 2, 6, 3, 1, 0, 5, 2, 4) /* stores 6 values */
value1 = sampfunc(1, 0) /* gets value at index 0 */ value2 = sampfunc(1, 4) /* gets value at index 4 */
print(value1) /* prints "3" */ print(value2) /* prints "2" */
for (i = 0; i < 6; i = i + 1) { /* prints all 6 values */ value = sampfunc(1, i) print(value) }
If you want to interpolate between successive values stored in a table, use sampfunci.