Hello!
I haven’t touched sciptOPs in a minute, and I keep blocking on this seemingly simple concept. I am trying to create custom parameters holding the references to a few different OPs, which seem to work. However, I can’t figure out how to assign/ change the value of these custom parameters, weather its an int, Pulse, or DAT… What am I doing wrong?
def onSetupParameters(scriptOp):
variablePage = scriptOp.appendCustomPage('Custom')
timerReset = variablePage.appendPulse('Resettimer', label='Reset Timer')
timerReset.val = op('basicControls')['reset']
currentTimer = variablePage.appendInt('Timer', label='Current Timer')
currentTimer.val = 0
animSequences = variablePage.appendDAT('Animtable')
animSequences.val = op('Animtable')
return
def onCook(scriptOp):
animTable = op(scriptOp.par.Animtable.val)
print(scriptOp.par.Resettimer.val)
# if the Timer value is 0, the program has not started. Press '9'.
if scriptOp.par.Timer.val == 0 & scriptOp.par.Resettimer.val == 1:
nextMoveIndex = random.randint(1, animTable.numRows - 1)
scriptOp.par.Timer.val = animTable[nextMoveIndex, 1]
print(nextMoveIndex)
print(scriptOp.par.Timer.val)
return
Sequencer.2.toe (6.2 KB)
Please help me understand!
Thanks you!!