Hello everyone,
I recently had to create a mechanism to store the previous value of a variable. It's nothing very complicated to do in Ventuz but I wanted to share my solution in case someone ever needs to do this:
The Live Value is sent to a Live Value buffer which waits 1 frame before grabbing the new value. Another buffer grabs the previous value during that 1 frame.
Here’s what goes on:
1. Live Value fires a Changed event when its value changes.
2. Both On Change (Delayed) and On Change (Immediate) events get triggered.
3. On Change (Immediate) triggers the Previous Value buffer which is linked to the Live Value buffer. This buffer contains the previous value since it hasn’t been triggered yet.
4. One frame later, On Change(Delayed) triggers the Live Value buffer which grabs the new Live Value.
This cycle repeats every time Live Value changes and keeps the previous value available.
You can then merge all of this logic into a Content Container and re-use it in a chain:
Hello Ventuzians!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
THE FORUMS ARE CLOSED!
Please join our discord server HERE!! << click me
We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server
Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!
Creating a memory mechanism
Moderator: Support