How to auto-generate a key/value array?

 

Hi there.


I'm struggling a bit to generate a key/value array to feed certain functions further down stream.
The goal is to generate that array over time.
Meaning: every nth second a new value is added to the array, the array grows over time.

I tried achieving that with a setup like so:

Every time the timer loops, a new random value is generated alongside an incremental index number.

I'm obviously doing something fundamentally wrong here, just can't figure out what. :-)

As always, any help is highly appreciated.

Cheers.

Eric.


   EricWest

 
Profile Image
Eifert@Aximmetry
  -  

Hi Eric,

You almost did it the right way, you need to add a copy and connect the random values to the Value input pin of Vector Set Item.
Without copying the vector, it will use a new vector every time.

You can think of this that every module can be executed only once in a frame. Even though there is a loop with the Copy module and Vector Set Item module, Aximmetry will only execute them once. And the data in the connection between the Copy module and Vector Set Item module will wait for the next frame to be processed.

Warmest regards,