Hi, I’m trying to pass a reactive number from patch editor as a driver to call a string from an array. That string is for a 2dtext text input.
So in patch editor I can plug in the number, and then the script will throw out the text accordingly, and it is also going to be updated if the input number changes without having to restart the effect.
This is my current script lines:
const P = require('Patches'); const S = require('Scene'); const R = require('Reactive'); const D = require('Diagnostics'); // Use export keyword to make a symbol available in scripting debug console export const Diagnostics = require('Diagnostics'); let x = P.outputs.getScalar('Nomer'); let quotes = [ 'abcde.', 'qwerty', 'xyzw', 'hello', 'bye', ]; let chosenQuotes = quotes; P.inputs.setString('Quotes', chosenQuotes);
That works, but if I change the 2 from line 19, with an x from line 9, it doesn’t work anymore. what am I missing here?