It might help other beginners in Aximmetry and save them time. I am building those to learn aximmetry and recreate basic programming workflows.
On of those is trigger an action when an integer internal state has changed.
For example, we have buttons in control boards that correspond to enumerable 0,1,2.. etc and we want to trigger the action ONLY when a button is pressed and is different from the previous button.
Here is the simple compound
We can tweak that if we want to allow the same button to be pressed or/and add debounce time
Here is the compound with debounce time
The Time to Text and log is just for debugging it is working.
Now if you are not interested in the previous state but just debounce and trigger on keypresses this is the compound
The only difference is that we set both NEW_VALUE and CURRENT_VALUE modules to -1 (or any other invalid integer state). So it will just throw away
Hi,
Thanks for snippets.
To check if a value is changed you can use the Delta module. Changed will be true in the frame when the input just changed.
For text we have a similar node called Text Changed.
Best Regards