I've kind of got similar functionality working in a few different ways, but each of them has caveats that don't seem to do exactly what I want, it's got me puzzled!
Firstly for context I think the best description would be an instance where I want to control multiple values from a single source, I would like to be able to save each value in a 'slot' and then recall it later. If I switch back to a slot I'd like to be able to recall the value without it being overwritten by the new value from the source.
(This isn't my intended use case) but Imagine a knob that controls brightness. It would be great to have that knob control brightness across multiple items, but retain the brightness value for each one.
I can kind of do this with holders and in integer as an index to only pass values if the slot is selected, I can use a collection or something to retrieve the values:
This however doesn't work very well as every time we select between different slots the value in the slot is updated with the new value in the dash scalar.
Another option is simply using a switch:
The problem here is obviously now I have 3 inputs. I can't control these reliably from a single source.
I played with a similar functionality to the camera mover whereby I use a sort of additive control to the single slot I want to change but this only affects values over time and is often not the behaviour that's needed.
Hi,
If you are setting these up in the Flow Editor only once per module. Then you might want to use the Capture Input option:
After you pressed Capture Input for that pin, you disconnect the connection from the pin and the value will be saved in the Pin Values panel.
You could set the Hold version to only overwrite when a logical is turned on, like this:
However, the Hold module will not keep values after you stopped the project.
To keep the values for the next time you run the project, you can use the Set Scalar Pin module.
With this setup, you overwrite the selected value in the Switch Scalar when the Trigger is pressed:
I used a peeker to see the live scalar data. But depending on your setting, you could for example set an If Scalar module after the Switch and use it to change between the live value and the saved values.
You can use a Pin Collector before the Switch Scalar to expose all the saved values to Control Boards.
Warmest regards,